Port: Add Solaris paths compat
authorMichael Jeanson <mjeanson@efficios.com>
Wed, 14 Oct 2015 21:01:05 +0000 (17:01 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 19 Oct 2015 18:54:21 +0000 (14:54 -0400)
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/compat/Makefile.am
src/common/compat/paths.h [new file with mode: 0644]
src/common/daemonize.c

index e12422585d529d8ae90de9795ff8154fba85c3e6..b3973847d2f3535fac07ef55ea226e4a322abbd3 100644 (file)
@@ -10,4 +10,4 @@ endif
 
 libcompat_la_SOURCES = poll.h fcntl.h endian.h mman.h \
                socket.h compat-fcntl.c uuid.h tid.h \
-               getenv.h string.h prctl.h $(COMPAT)
+               getenv.h string.h prctl.h paths.h $(COMPAT)
diff --git a/src/common/compat/paths.h b/src/common/compat/paths.h
new file mode 100644 (file)
index 0000000..e1fcb75
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2015 - Michael Jeanson <mjeanson@efficios.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License, version 2 only,
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef _COMPAT_PATHS_H
+#define _COMPAT_PATHS_H
+
+#ifdef HAVE_PATHS_H
+# include <paths.h>
+#else
+# define _PATH_DEVNULL "/dev/null"
+#endif
+
+#endif /* _COMPAT_PATHS_H */
index 4b4531d53613f792d0bf410bc2048085cee9db2e..300851bb3ca6e01a8b3d10fe824c8b2935172b0d 100644 (file)
@@ -18,7 +18,7 @@
 
 #define _LGPL_SOURCE
 #include <unistd.h>
-#include <paths.h>
+#include <common/compat/paths.h>
 #include <fcntl.h>
 #include <wait.h>
 #include <stdlib.h>
This page took 0.039776 seconds and 5 git commands to generate.