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:
		
				
					committed by
					
						
						William Hubbs
					
				
			
			
				
	
			
			
			
						parent
						
							86e9aa0d36
						
					
				
				
					commit
					3f82edbeb9
				
			@@ -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)
 | 
			
		||||
{
 | 
			
		||||
 
 | 
			
		||||
@@ -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)
 | 
			
		||||
{
 | 
			
		||||
 
 | 
			
		||||
@@ -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>
 | 
			
		||||
 
 | 
			
		||||
@@ -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>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user