Mercurial > hg > dhcpcd
changeset 41:b3ed04340ded draft
Change back to gnu99 to support generic Linux headers until they work with c99 like they should.
| author | Roy Marples <roy@marples.name> |
|---|---|
| date | Thu, 21 Dec 2006 18:23:15 +0000 |
| parents | 1f5ee194cacf |
| children | ecc8b472a271 |
| files | ChangeLog Makefile interface.c |
| diffstat | 3 files changed, 9 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Thu Dec 21 16:51:16 2006 +0000 +++ b/ChangeLog Thu Dec 21 18:23:15 2006 +0000 @@ -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
--- a/Makefile Thu Dec 21 16:51:16 2006 +0000 +++ b/Makefile Thu Dec 21 18:23:15 2006 +0000 @@ -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 @@ # 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 @@ 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
--- a/interface.c Thu Dec 21 16:51:16 2006 +0000 +++ b/interface.c Thu Dec 21 18:23:15 2006 +0000 @@ -26,15 +26,6 @@ #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 */
