From: Roy Marples Date: Fri, 22 Feb 2008 14:35:27 +0000 (+0000) Subject: Fix building on GNU/kFreeBSD, Debian #467005 X-Git-Tag: v3.2.3~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=349d5cd8ea4e5626af15f7bc4f42baab8ca4a12a;p=thirdparty%2Fdhcpcd.git Fix building on GNU/kFreeBSD, Debian #467005 --- diff --git a/common.h b/common.h index fa8f9281..46f1886d 100644 --- 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 diff --git a/interface.c b/interface.c index 32926243..f0f19336 100644 --- a/interface.c +++ b/interface.c @@ -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 diff --git a/socket.c b/socket.c index 4d5a9d5a..ef0a21a8 100644 --- a/socket.c +++ b/socket.c @@ -44,7 +44,7 @@ #include #include -#ifdef BSD +#if defined(BSD) || defined(__FreeBSD_kernel__) # include #elif __linux__ # include @@ -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;