From 442f64a83bd2c5da085bc6dc50533df2d483be3b Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Thu, 16 Jun 2011 04:36:46 +0000 Subject: build: fixes to work on solaris Signed-off-by: Amar Tumballi Signed-off-by: Anand Avati BUG: 3002 (build issues on solaris) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3002 --- contrib/apple/daemon.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'contrib') diff --git a/contrib/apple/daemon.c b/contrib/apple/daemon.c index 07dbbc400..060f6a430 100644 --- a/contrib/apple/daemon.c +++ b/contrib/apple/daemon.c @@ -39,7 +39,6 @@ #include #include -#include #include #include @@ -77,7 +76,9 @@ os_daemon_return(nochdir, noclose) if (!nochdir) (void)chdir("/"); - if (!noclose && (fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) { + /* Was using '_PATH_DEVNULL' earlier. As it was not defined in solaris, + changed to hardcoded path (and removed '#include ' too) */ + 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); -- cgit