From: Roy Marples Date: Thu, 24 Sep 2009 21:29:18 +0000 (+0000) Subject: Add -fno-common to debugging CFLAGS. X-Git-Tag: v5.1.2~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4389097b21991f8cb65d577af94ac6ccaefe25a9;p=thirdparty%2Fdhcpcd.git Add -fno-common to debugging CFLAGS. Declare udp_dhcp_len as extern. Include common.h in dhcp.h to get _packed definition. Thanks to David Wu for pointing this out. --- diff --git a/configure b/configure index daf83102..7275a6e3 100755 --- a/configure +++ b/configure @@ -142,6 +142,7 @@ CFLAGS+= -Wredundant-decls -Wnested-externs CFLAGS+= -Winline -Wwrite-strings -Wcast-align -Wcast-qual CFLAGS+= -Wpointer-arith CFLAGS+= -Wdeclaration-after-statement -Wsequence-point +CFLAGS+= -fno-common EOF fi diff --git a/dhcp.h b/dhcp.h index 85845f04..a53e2922 100644 --- a/dhcp.h +++ b/dhcp.h @@ -33,6 +33,8 @@ #include +#include "common.h" + /* Max MTU - defines dhcp option length */ #define MTU_MAX 1500 #define MTU_MIN 576 diff --git a/net.h b/net.h index 7c7c24c6..ba5d6d13 100644 --- a/net.h +++ b/net.h @@ -130,7 +130,7 @@ int if_route(const struct interface *, const struct in_addr *, void free_routes(struct rt *); int open_udp_socket(struct interface *); -const size_t udp_dhcp_len; +extern const size_t udp_dhcp_len; ssize_t make_udp_packet(uint8_t **, const uint8_t *, size_t, struct in_addr, struct in_addr); ssize_t get_udp_data(const uint8_t **, const uint8_t *);