commit:     085d77f17e3bedd23ffa96fe7e4eb8515ae8bfc6
Author:     Benda Xu <heroxbd <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 11 19:37:41 2015 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Wed Nov 11 19:37:41 2015 +0000
URL:        https://gitweb.gentoo.org/proj/openrc.git/commit/?id=085d77f1

Standardize macro tests for gnu hurd

This also fixes breakage of GNU/hurd builds introduced by commit 3f82edbeb92.

 src/librc/librc-daemon.c | 3 ++-
 src/rc/mountinfo.c       | 8 ++++----
 src/rc/openrc-run.c      | 4 ++--
 src/rc/rc-logger.c       | 3 ++-
 4 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/src/librc/librc-daemon.c b/src/librc/librc-daemon.c
index 4986f70..09b2ce3 100644
--- a/src/librc/librc-daemon.c
+++ b/src/librc/librc-daemon.c
@@ -31,7 +31,8 @@
 #include "queue.h"
 #include "librc.h"
 
-#if defined(__linux__) || (defined (__FreeBSD_kernel__) && defined(__GLIBC__))
+#if defined(__linux__) || (defined (__FreeBSD_kernel__) && defined(__GLIBC__)) 
\
+       || defined(__GNU__)
 static bool
 pid_is_exec(pid_t pid, const char *exec)
 {

diff --git a/src/rc/mountinfo.c b/src/rc/mountinfo.c
index 3f1dfb6..8951c5a 100644
--- a/src/rc/mountinfo.c
+++ b/src/rc/mountinfo.c
@@ -39,8 +39,8 @@
 #  include <sys/statvfs.h>
 #  define statfs statvfs
 #  define F_FLAGS f_flag
-#elif defined (__linux__) || (defined(__FreeBSD_kernel__) && \
-               defined(__GLIBC__)) || defined(__GNU__)
+#elif defined(__linux__) || (defined(__FreeBSD_kernel__) && \
+       defined(__GLIBC__)) || defined(__GNU__)
 #  include <mntent.h>
 #endif
 
@@ -267,8 +267,8 @@ find_mounts(struct args *args)
        return list;
 }
 
-#elif defined (__linux__) || (defined (__FreeBSD_kernel__) && \
-               defined(__GLIBC__))
+#elif defined(__linux__) || (defined(__FreeBSD_kernel__) && \
+       defined(__GLIBC__)) || defined(__GNU__)
 static struct mntent *
 getmntfile(const char *file)
 {

diff --git a/src/rc/openrc-run.c b/src/rc/openrc-run.c
index f3a009e..2af95ec 100644
--- a/src/rc/openrc-run.c
+++ b/src/rc/openrc-run.c
@@ -51,8 +51,8 @@
 #include <time.h>
 #include <unistd.h>
 
-#if defined(__linux__) || (defined(__FreeBSD_kernel__) && \
-               defined(__GLIBC__))
+#if defined(__linux__) || (defined(__FreeBSD_kernel__) && defined(__GLIBC__)) \
+       || defined(__GNU__)
 #  include <pty.h>
 #elif defined(__NetBSD__) || defined(__OpenBSD__)
 #  include <util.h>

diff --git a/src/rc/rc-logger.c b/src/rc/rc-logger.c
index e72f181..894912f 100644
--- a/src/rc/rc-logger.c
+++ b/src/rc/rc-logger.c
@@ -44,7 +44,8 @@
 #include <time.h>
 #include <unistd.h>
 
-#if defined(__linux__) || (defined(__FreeBSD_kernel__) && defined(__GLIBC__))
+#if defined(__linux__) || (defined(__FreeBSD_kernel__) && defined(__GLIBC__)) \
+       || defined(__GNU__)
 #  include <pty.h>
 #elif defined(__NetBSD__) || defined(__OpenBSD__)
 #  include <util.h>

Reply via email to