summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2011-06-16 04:36:46 +0000
committerAnand Avati <avati@gluster.com>2011-06-16 22:01:54 -0700
commit442f64a83bd2c5da085bc6dc50533df2d483be3b (patch)
treef02c5fa0725bde3f79a83a52afc0646582dd33cf /contrib
parent41263d553f25e4f59d2751e7e3b2a23b264370f8 (diff)
build: fixes to work on solaris
Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3002 (build issues on solaris) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3002
Diffstat (limited to 'contrib')
-rw-r--r--contrib/apple/daemon.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/apple/daemon.c b/contrib/apple/daemon.c
index 07dbbc400b3..060f6a4307b 100644
--- a/contrib/apple/daemon.c
+++ b/contrib/apple/daemon.c
@@ -39,7 +39,6 @@
#include <errno.h>
#include <fcntl.h>
-#include <paths.h>
#include <signal.h>
#include <unistd.h>
@@ -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 <paths.h>' 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);