changeset 76:7eccf5c307df draft

Build correctly on dietlibc, thanks to d00mer.
author Roy Marples <roy@marples.name>
date Fri, 23 Mar 2007 10:09:14 +0000
parents cb3acf4f0411
children 0d143e90c3cb
files ChangeLog interface.c
diffstat 2 files changed, 9 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Mar 23 10:02:02 2007 +0000
+++ b/ChangeLog	Fri Mar 23 10:09:14 2007 +0000
@@ -1,5 +1,6 @@
 When we get an invalid length for a DHCP option, try and continue anyway.
 When MTU is less than 576 we now ignore it instead of setting the MTU to 576.
+Build correctly on dietlibc, thanks to d00mer.
 
 dhcpcd-3.0.16
 RFC 2131 is full of confusion regarding MTU it seems as the effective minimum
--- a/interface.c	Fri Mar 23 10:02:02 2007 +0000
+++ b/interface.c	Fri Mar 23 10:09:14 2007 +0000
@@ -34,17 +34,21 @@
 #include <netinet/ether.h>
 #include <netpacket/packet.h>
 /* Only glibc-2.3 ships with ifaddrs.h */
-#if defined (__GLIBC__) && defined (__GLIBC_PREREQ) && __GLIBC_PREREQ (2,3)
-#define HAVE_IFADDRS_H
-#include <ifaddrs.h>
+#if defined (__GLIBC__) && defined (__GLIBC_PREREQ)
+#  if  __GLIBC_PREREQ (2,3)
+#    define HAVE_IFADDRS_H
+#    include <ifaddrs.h>
+#  endif
 #endif
 #else
+#include <net/if_arp.h> /*dietlibc requires this - normally from
+			  netinet/ether.h */
 #include <net/if_dl.h>
 #include <net/if_types.h>
 #include <net/route.h>
 #include <netinet/in.h>
 #define HAVE_IFADDRS_H
-#include <ifaddrs.h>
+#  include <ifaddrs.h>
 #endif
 
 #include <errno.h>