Fix GNU/kFreeBSD port

Check for __FreeBSD_kernel instead of __GLIBC__ in source files.

note from William Hubbs:
I was told this is a better check for GNU/kFreeBSD than checking the
C  library the source is being compiled against.
GNU/kFreeBSD than checking which library we are using.
This commit is contained in:
Svante Signell 2014-10-21 01:53:37 -05:00 committed by William Hubbs
parent 86e9aa0d36
commit 3f82edbeb9
4 changed files with 5 additions and 5 deletions

View File

@ -30,7 +30,7 @@
#include "librc.h"
#if defined(__linux__) || defined (__GLIBC__)
#if defined(__linux__) || defined (__FreeBSD_kernel__)
static bool
pid_is_exec(pid_t pid, const char *exec)
{

View File

@ -39,7 +39,7 @@
# include <sys/statvfs.h>
# define statfs statvfs
# define F_FLAGS f_flag
#elif defined (__linux__) || defined (__GLIBC__)
#elif defined (__linux__) || defined (__FreeBSD_kernel__)
# include <mntent.h>
#endif
@ -265,7 +265,7 @@ find_mounts(struct args *args)
return list;
}
#elif defined (__linux__) || defined (__GLIBC__)
#elif defined (__linux__) || defined (__FreeBSD_kernel__)
static struct mntent *
getmntfile(const char *file)
{

View File

@ -44,7 +44,7 @@
#include <time.h>
#include <unistd.h>
#if defined(__linux__) || defined(__GLIBC__)
#if defined(__linux__) || defined(__FreeBSD_kernel__)
# include <pty.h>
#elif defined(__NetBSD__) || defined(__OpenBSD__)
# include <util.h>

View File

@ -51,7 +51,7 @@
#include <time.h>
#include <unistd.h>
#if defined(__linux__) || defined(__GLIBC__)
#if defined(__linux__) || defined(__FreeBSD_kernel__)
# include <pty.h>
#elif defined(__NetBSD__) || defined(__OpenBSD__)
# include <util.h>