summaryrefslogtreecommitdiff
path: root/mail/smtptrapd/files/patch-smtptrapd.c
blob: 0ba2820481db229d5d973c58c273a2c8c3002e67 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--- smtptrapd.c.orig	Sun Mar 20 00:01:06 2005
+++ smtptrapd.c	Sun Mar 20 00:01:36 2005
@@ -27,9 +27,9 @@
 #include <sys/time.h>
 #include <sys/types.h>
 #include <unistd.h>
+#include <netinet/in.h>
 #include <arpa/inet.h>
 #include <sys/socket.h>
-#include <netinet/in.h>
 #include <errno.h>
 #include <string.h>
 #include <sysexits.h>
@@ -491,7 +491,11 @@
 	/* background the process */
 	if (fork()) exit(0);
 	if (fork()) exit(0);
+#ifdef __FreeBSD__
+	setpgrp(0, 0);
+#else
 	setpgrp(); 
+#endif
 
 	openlog("smtptrapd", LOG_PID, LOG_MAIL);