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:
parent
86e9aa0d36
commit
3f82edbeb9
@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
#include "librc.h"
|
#include "librc.h"
|
||||||
|
|
||||||
#if defined(__linux__) || defined (__GLIBC__)
|
#if defined(__linux__) || defined (__FreeBSD_kernel__)
|
||||||
static bool
|
static bool
|
||||||
pid_is_exec(pid_t pid, const char *exec)
|
pid_is_exec(pid_t pid, const char *exec)
|
||||||
{
|
{
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
# include <sys/statvfs.h>
|
# include <sys/statvfs.h>
|
||||||
# define statfs statvfs
|
# define statfs statvfs
|
||||||
# define F_FLAGS f_flag
|
# define F_FLAGS f_flag
|
||||||
#elif defined (__linux__) || defined (__GLIBC__)
|
#elif defined (__linux__) || defined (__FreeBSD_kernel__)
|
||||||
# include <mntent.h>
|
# include <mntent.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -265,7 +265,7 @@ find_mounts(struct args *args)
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif defined (__linux__) || defined (__GLIBC__)
|
#elif defined (__linux__) || defined (__FreeBSD_kernel__)
|
||||||
static struct mntent *
|
static struct mntent *
|
||||||
getmntfile(const char *file)
|
getmntfile(const char *file)
|
||||||
{
|
{
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#if defined(__linux__) || defined(__GLIBC__)
|
#if defined(__linux__) || defined(__FreeBSD_kernel__)
|
||||||
# include <pty.h>
|
# include <pty.h>
|
||||||
#elif defined(__NetBSD__) || defined(__OpenBSD__)
|
#elif defined(__NetBSD__) || defined(__OpenBSD__)
|
||||||
# include <util.h>
|
# include <util.h>
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#if defined(__linux__) || defined(__GLIBC__)
|
#if defined(__linux__) || defined(__FreeBSD_kernel__)
|
||||||
# include <pty.h>
|
# include <pty.h>
|
||||||
#elif defined(__NetBSD__) || defined(__OpenBSD__)
|
#elif defined(__NetBSD__) || defined(__OpenBSD__)
|
||||||
# include <util.h>
|
# include <util.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user