diff options
Diffstat (limited to 'net/arpwatch-devel/files/patch-ah')
-rw-r--r-- | net/arpwatch-devel/files/patch-ah | 85 |
1 files changed, 31 insertions, 54 deletions
diff --git a/net/arpwatch-devel/files/patch-ah b/net/arpwatch-devel/files/patch-ah index b292b25116d0..ba79d66f0448 100644 --- a/net/arpwatch-devel/files/patch-ah +++ b/net/arpwatch-devel/files/patch-ah @@ -1,55 +1,32 @@ ---- report.c.orig Sun Oct 1 00:41:10 2000 -+++ report.c Thu May 16 11:34:33 2002 -@@ -45,6 +45,8 @@ - - #include <ctype.h> - #include <errno.h> -+#include <fcntl.h> -+#include <paths.h> - #include <signal.h> - #include <stdio.h> - #include <stdlib.h> -@@ -70,6 +72,8 @@ - - #define PLURAL(n) ((n) == 1 || (n) == -1 ? "" : "s") - -+extern char *Watcher; +--- ../arpwatch.orig/configure Wed May 16 14:26:11 2001 ++++ ./configure Wed Sep 10 13:08:05 2003 +@@ -649,7 +649,7 @@ + : + fi + +- V_CCOPT="-O" ++# V_CCOPT="-O" + V_INCLS="" + if test "${srcdir}" != "." ; then + V_INCLS="-I\$\(srcdir\)" +@@ -2496,7 +2496,7 @@ + fi + V_CCOPT="$V_CCOPT -Wall" + if test $ac_cv_lbl_gcc_vers -gt 1 ; then +- V_CCOPT="$V_CCOPT -Wmissing-prototypes -Wstrict-prototypes" ++# V_CCOPT="$V_CCOPT -Wmissing-prototypes -Wstrict-prototypes" + fi + fi + else +@@ -3075,6 +3075,11 @@ + if test ! -f arp.dat ; then + echo 'creating empty arp.dat file' + touch arp.dat ++fi + - static int cdepth; /* number of outstanding children */ - - static char *fmtdate(time_t); -@@ -240,7 +244,7 @@ - register FILE *f; - char tempfile[64], cpu[64], os[64]; - char *fmt = "%20s: %s\n"; -- char *watcher = WATCHER; -+ char *watcher = Watcher ? Watcher : WATCHER; - char *watchee = WATCHEE; - char *sendmail = PATH_SENDMAIL; - char *unknown = "<unknown>"; -@@ -344,6 +348,25 @@ - exit(1); - } - /* XXX Need to freopen()? */ -+ -+ /* -+ * Open /dev/null as stdout and stderr so that sendmail 8.12.1 (and -+ * above ?) won't complain about missing file descriptors. -+ */ -+ if ((fd = open(_PATH_DEVNULL, O_RDWR)) == -1) { -+ syslog(LOG_ERR, "Cannot open %s: %m", _PATH_DEVNULL); -+ exit(1); -+ } -+ if (dup2(fd, STDOUT_FILENO) == -1) { -+ syslog(LOG_ERR, "Cannot dup2 %s to stdout: %m", _PATH_DEVNULL); -+ exit(1); -+ } -+ if (dup2(fd, STDERR_FILENO) == -1) { -+ syslog(LOG_ERR, "Cannot dup2 %s to stderr: %m", _PATH_DEVNULL); -+ exit(1); -+ } -+ close(fd); -+ - /* Always Deliver interactively (pause when child depth gets large) */ - execl(sendmail, "sendmail", "-odi", watcher, NULL); - syslog(LOG_ERR, "execl: %s: %m", sendmail); ++if test ! -f ether.dat ; then ++ echo 'creating empty ether.dat file' ++ touch ether.dat + fi + + if test -f .devel ; then |