From: Roy Marples Date: Thu, 21 Dec 2006 18:23:15 +0000 (+0000) Subject: Change back to gnu99 to support generic Linux headers until they work with c99 like... X-Git-Tag: v3.2.3~333 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e07455bcc75bb471386d59b930813f9ff1ec434b;p=thirdparty%2Fdhcpcd.git Change back to gnu99 to support generic Linux headers until they work with c99 like they should. --- diff --git a/ChangeLog b/ChangeLog index 12ddbe43..38a893f3 100644 --- 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 diff --git a/Makefile b/Makefile index 18a3578e..d3ce0691 100644 --- 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 diff --git a/interface.c b/interface.c index d69a857b..a8e7f422 100644 --- a/interface.c +++ b/interface.c @@ -26,15 +26,6 @@ #include -/* Check linux version before including headers which break us */ -#ifdef __linux__ -#include -#include -#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 /* Needed for 2.4 kernels */