]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix building on GNU/kFreeBSD, Debian #467005
authorRoy Marples <roy@marples.name>
Fri, 22 Feb 2008 14:35:27 +0000 (14:35 +0000)
committerRoy Marples <roy@marples.name>
Fri, 22 Feb 2008 14:35:27 +0000 (14:35 +0000)
common.h
interface.c
socket.c

index fa8f9281191080b0c85de472bdf418cb1232fec3..46f1886d597581efdefe9823b217a97f61ba48c5 100644 (file)
--- a/common.h
+++ b/common.h
@@ -49,7 +49,7 @@ size_t strlcpy (char *dst, const char *src, size_t size);
 #endif
 
 #define HAVE_SRANDOMDEV
-#if defined(__linux__) || defined(__NetBSD__)
+#if defined(__GLIBC__) || defined(__NetBSD__)
 #  undef HAVE_SRANDOMDEV
 void srandomdev (void);
 #endif
index 32926243427ec25429f70d52114421ba6b8e7c4f..f0f19336ae61edf57a4af4932c4d088834c9fe57 100644 (file)
@@ -530,7 +530,7 @@ static void log_route (struct in_addr destination,
        free (dstd);
 }
 
-#ifdef BSD
+#if defined(BSD) || defined(__FreeBSD_kernel__)
 
 /* Darwin doesn't define this for some very odd reason */
 #ifndef SA_SIZE
index 4d5a9d5a099ee5913f2db70e6507ed221212f225..ef0a21a83e6563671a07f4a5ad2fd9ecdb657147 100644 (file)
--- a/socket.c
+++ b/socket.c
@@ -44,7 +44,7 @@
 #include <time.h>
 #include <unistd.h>
 
-#ifdef BSD
+#if defined(BSD) || defined(__FreeBSD_kernel__)
 # include <net/bpf.h>
 #elif __linux__
 # include <linux/filter.h>
@@ -255,7 +255,7 @@ eexit:
        return retval;
 }
 
-#ifdef BSD
+#if defined(BSD) || defined(__FreeBSD_kernel__)
 int open_socket (interface_t *iface, int protocol)
 {
        int n = 0;