From 085d77f17e3bedd23ffa96fe7e4eb8515ae8bfc6 Mon Sep 17 00:00:00 2001 From: Benda Xu Date: Wed, 11 Nov 2015 13:37:41 -0600 Subject: 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(-) (limited to 'src') diff --git a/src/librc/librc-daemon.c b/src/librc/librc-daemon.c index 4986f70d..09b2ce30 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 3f1dfb60..8951c5ad 100644 --- a/src/rc/mountinfo.c +++ b/src/rc/mountinfo.c @@ -39,8 +39,8 @@ # include # 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 #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 f3a009e5..2af95ec4 100644 --- a/src/rc/openrc-run.c +++ b/src/rc/openrc-run.c @@ -51,8 +51,8 @@ #include #include -#if defined(__linux__) || (defined(__FreeBSD_kernel__) && \ - defined(__GLIBC__)) +#if defined(__linux__) || (defined(__FreeBSD_kernel__) && defined(__GLIBC__)) \ + || defined(__GNU__) # include #elif defined(__NetBSD__) || defined(__OpenBSD__) # include diff --git a/src/rc/rc-logger.c b/src/rc/rc-logger.c index e72f1818..894912fd 100644 --- a/src/rc/rc-logger.c +++ b/src/rc/rc-logger.c @@ -44,7 +44,8 @@ #include #include -#if defined(__linux__) || (defined(__FreeBSD_kernel__) && defined(__GLIBC__)) +#if defined(__linux__) || (defined(__FreeBSD_kernel__) && defined(__GLIBC__)) \ + || defined(__GNU__) # include #elif defined(__NetBSD__) || defined(__OpenBSD__) # include -- cgit v1.2.3