mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-08-04 02:08:49 -04:00
35 lines
852 B
Plaintext
35 lines
852 B
Plaintext
$NetBSD: patch-ac,v 1.1 2011/10/28 17:13:26 tez Exp $
|
|
|
|
Correct location of errno.h to standard
|
|
Remove use of _PATH_DEVNULL which is apparently linux only
|
|
|
|
--- src/logsurfer.c.orig 2011-10-28 10:45:07.015975100 -0500
|
|
+++ src/logsurfer.c 2011-10-28 10:45:13.514116000 -0500
|
|
@@ -47,7 +47,7 @@
|
|
#include <signal.h>
|
|
#include <sys/types.h>
|
|
#include <sys/stat.h>
|
|
-#include <paths.h>
|
|
+/*#include <paths.h>*/
|
|
|
|
#if TIME_WITH_SYS_TIME
|
|
#include <sys/time.h>
|
|
@@ -76,7 +76,7 @@
|
|
#include <malloc.h>
|
|
#endif
|
|
|
|
-#include <sys/errno.h>
|
|
+#include <errno.h>
|
|
#include <fcntl.h>
|
|
|
|
/* local includes */
|
|
@@ -323,7 +323,7 @@
|
|
exit(0);
|
|
}
|
|
|
|
- if ( (fd = open(_PATH_DEVNULL, O_RDWR, 0)) < 0) {
|
|
+ if ( (fd = open("/dev/null", O_RDWR, 0)) < 0) {
|
|
(void) fprintf(stderr, "could not daemonize: %s\n", strerror(errno));
|
|
exit(11);
|
|
}
|