Fix compilation error on NetBSD2.0

git-svn: trunk@3177
remotes/push_mirror/metadata
Nigel Horne 18 years ago
parent 1bdf312376
commit 55b254316d
  1. 4
      ChangeLog
  2. 12
      clamav-milter/clamav-milter.c

@ -1,3 +1,7 @@
Sun Aug 19 10:35:38 BST 2007 (njh)
----------------------------------
* clamav-milter: Fix compilation error on NetBSD2.0
Sat Aug 18 16:12:51 BST 2007 (njh)
----------------------------------
* clamav-milter: Black-hole-mode no longer needs to be run as root

@ -33,7 +33,7 @@
*/
static char const rcsid[] = "$Id: clamav-milter.c,v 1.312 2007/02/12 22:24:21 njh Exp $";
#define CM_VERSION "devel-180807"
#define CM_VERSION "devel-190807"
#if HAVE_CONFIG_H
#include "clamav-config.h"
@ -1202,11 +1202,19 @@ main(int argc, char **argv)
perror(SENDMAIL_BIN);
are_trusted = 0;
} else {
int status;
char buf[BUFSIZ];
while(fgets(buf, sizeof(buf), sendmail) != NULL)
;
switch(WEXITSTATUS(pclose(sendmail))) {
/*
* Can't do
* switch(WEXITSTATUS(pclose(sendmail)))
* because that fails to compile on
* NetBSD2.0
*/
status = pclose(sendmail);
switch(WEXITSTATUS(status)) {
case EX_NOUSER:
/*
* No root? But at least

Loading…
Cancel
Save