]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Change back to gnu99 to support generic Linux headers until they work with c99 like...
authorRoy Marples <roy@marples.name>
Thu, 21 Dec 2006 18:23:15 +0000 (18:23 +0000)
committerRoy Marples <roy@marples.name>
Thu, 21 Dec 2006 18:23:15 +0000 (18:23 +0000)
ChangeLog
Makefile
interface.c

index 12ddbe436f667c2feef241b4944d89be94a55225..38a893f3638bfb4462f91e804357498d888303a0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,6 @@
-Fix arp checking
-linux-2.6.19 headers NOW don't work with c99 which is just wrong, so
-dhcpcd no longer builds against these kernel headers. You get a nice
-error though :)
+Fix arp checking.
+linux header asm/types.h doesn't work with c99 which is just wrong,
+so it's back to gnu99 until a working linux version is released.
 
 dhcpcd-3.0.7
 Allow Linux to use Token Ring again as Linux does not have any more hardware
index 18a3578e5e04d73c30b1dcf58407b9902492d29e..d3ce069180fe76eb2775970bf7caba99d2ad5fd5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,12 +2,15 @@
 
 VERSION = 3.0.8_pre1
 
-INSTALL ?= install
+# We define _BSD_SOURCE as GNU supports BSD too - which is nice :)
+CDEFS = -D_BSD_SOURCE
 
 CFLAGS ?= -O2 -pipe
 
 # Loads of nice flags to ensure our code is good
-CFLAGS += -pedantic -std=c99 \
+# IMPORTANT: We should be using c99 instead of gnu99 but for some reason
+# generic linux headers as of 2.6.19 don't allow this in asm/types.h
+CFLAGS += -pedantic -std=gnu99 \
     -Wall -Wunused -Wimplicit -Wshadow -Wformat=2 \
     -Wmissing-declarations -Wno-missing-prototypes -Wwrite-strings \
     -Wbad-function-cast -Wnested-externs -Wcomment -Winline \
@@ -21,6 +24,7 @@ CFLAGS += -Wsequence-point -Wextra -Wdeclaration-after-statement
 #  have buggy headers from time to time, so you may need to comment this out
 #CFLAGS += -Werror
 
+INSTALL ?= install
 DESTDIR =
 SBINDIR = $(DESTDIR)/sbin
 MANDIR = $(DESTDIR)/usr/share/man
@@ -43,7 +47,6 @@ dhcpcd: $(dhcpcd_H) $(dhcpcd_OBJS)
 version.h:
        echo '#define VERSION "$(VERSION)"' > version.h
 
-# We define _BSD_SOURCE as GNU supports BSD too - which is nice :)
 $(dhcpcd_OBJS): 
        $(CC) -D_BSD_SOURCE $(CFLAGS) -c $*.c
 
index d69a857beadb8e7e49144e52c439292b22af6c18..a8e7f4226793b533c23096276b11c46aa69ab645 100644 (file)
 
 #include <arpa/inet.h>
 
-/* Check linux version before including headers which break us */
-#ifdef __linux__ 
-#include <features.h>
-#include <linux/version.h>
-#if LINUX_VERSION_CODE == KERNEL_VERSION (2,6,19)
-#error "linux 2.6.19 headers are so badly broken, use something else"
-#endif
-#endif
-
 /* Netlink suff */
 #ifdef __linux__
 #include <asm/types.h> /* Needed for 2.4 kernels */