Skip to content

Commit

Permalink
Fix compilation error on NetBSD2.0
Browse files Browse the repository at this point in the history
git-svn: trunk@3177
  • Loading branch information
Nigel Horne committed Aug 19, 2007
1 parent 1bdf312 commit 55b2543
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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
Expand Down
12 changes: 10 additions & 2 deletions clamav-milter/clamav-milter.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 55b2543

Please sign in to comment.