]> err.no Git - varnish/commitdiff
Don't rely on non-portable <paths.h>
authordes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Thu, 1 Nov 2007 21:52:34 +0000 (21:52 +0000)
committerdes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Thu, 1 Nov 2007 21:52:34 +0000 (21:52 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2224 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/lib/libvarnishcompat/daemon.c

index f571d199e17ba39094d5044146d251eab7c11ec7..a1c5f3b44521575bb0cb3257fd7f54684857b981 100644 (file)
@@ -35,7 +35,6 @@
 
 #include <errno.h>
 #include <fcntl.h>
-#include <paths.h>
 #include <stdlib.h>
 #include <signal.h>
 #include <unistd.h>
@@ -79,7 +78,7 @@ daemon(int nochdir, int noclose)
        if (!nochdir)
                (void)chdir("/");
 
-       if (!noclose && (fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) {
+       if (!noclose && (fd = open("/dev/null", O_RDWR, 0)) != -1) {
                (void)dup2(fd, STDIN_FILENO);
                (void)dup2(fd, STDOUT_FILENO);
                (void)dup2(fd, STDERR_FILENO);