pkgsrc/mail/qmail/patches/patch-ab
zuntum efd2204448 Store patches locally instead of fetching them from PATCH_SITES - fixes
problem with qmailqueue patch unexpectedly differing over time
2002-05-03 10:39:00 +00:00

34 lines
763 B
Text

$NetBSD: patch-ab,v 1.1 2002/05/03 10:39:01 zuntum Exp $
Second part of QMAILQUEUE patch, as found on http://www.qmail.org/
--- qmail.c.orig Mon Jun 15 04:53:16 1998
+++ qmail.c Tue Jan 19 09:57:36 1999
@@ -6,14 +6,25 @@
#include "fd.h"
#include "qmail.h"
#include "auto_qmail.h"
+#include "env.h"
-static char *binqqargs[2] = { "bin/qmail-queue", 0 } ;
+static char *binqqargs[2] = { 0, 0 } ;
+
+static void setup_qqargs()
+{
+ if(!binqqargs[0])
+ binqqargs[0] = env_get("QMAILQUEUE");
+ if(!binqqargs[0])
+ binqqargs[0] = "bin/qmail-queue";
+}
int qmail_open(qq)
struct qmail *qq;
{
int pim[2];
int pie[2];
+
+ setup_qqargs();
if (pipe(pim) == -1) return -1;
if (pipe(pie) == -1) { close(pim[0]); close(pim[1]); return -1; }