Package: dhcpcd
Severity: important
Version: 1:3.2.2-1
Tags: patch
User: [EMAIL PROTECTED]
Usertags: kfreebsd

Hi,

the current version fails to build on GNU/kFreeBSD.

It needs small tweaks. Please find attached patch with them.

It would also be nice if you can ask upstream
to include this changes.

Thanks in advance

                        Petr
only in patch2:
unchanged:
--- dhcpcd-3.2.2.orig/common.h
+++ dhcpcd-3.2.2/common.h
@@ -47,7 +47,7 @@
 #endif
 
 #define HAVE_SRANDOMDEV
-#if defined(__linux__) || defined(__NetBSD__)
+#if defined(__linux__) || defined(__NetBSD__) || defined(__GLIBC__)
 #  undef HAVE_SRANDOMDEV
 void srandomdev (void);
 #endif
only in patch2:
unchanged:
--- dhcpcd-3.2.2.orig/interface.c
+++ dhcpcd-3.2.2/interface.c
@@ -528,7 +528,7 @@
        free (dstd);
 }
 
-#ifdef BSD
+#if defined(BSD) || defined (__FreeBSD_kernel__)
 
 /* Darwin doesn't define this for some very odd reason */
 #ifndef SA_SIZE
only in patch2:
unchanged:
--- dhcpcd-3.2.2.orig/socket.c
+++ dhcpcd-3.2.2/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 @@
        return retval;
 }
 
-#ifdef BSD
+#if defined(BSD) || defined (__FreeBSD_kernel__) 
 int open_socket (interface_t *iface, int protocol)
 {
        int n = 0;

Reply via email to