changeset 1424:af4ccf4edb18 draft dhcpcd-5.0

Add -fno-common to debugging CFLAGS. Declare udp_dhcp_len as extern. Include common to get _packed definition.
author Roy Marples <roy@marples.name>
date Thu, 24 Sep 2009 21:25:54 +0000
parents dca862772d27
children 636f917e9d30
files dhcp.h mk/cc.mk net.h
diffstat 3 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/dhcp.h	Tue Sep 22 06:14:38 2009 +0000
+++ b/dhcp.h	Thu Sep 24 21:25:54 2009 +0000
@@ -33,6 +33,8 @@
 
 #include <stdint.h>
 
+#include "common.h"
+
 /* Max MTU - defines dhcp option length */
 #define MTU_MAX             1500
 #define MTU_MIN             576
--- a/mk/cc.mk	Tue Sep 22 06:14:38 2009 +0000
+++ b/mk/cc.mk	Thu Sep 24 21:25:54 2009 +0000
@@ -18,7 +18,7 @@
 		-Wredundant-decls  -Wnested-externs \
 		-Winline -Wwrite-strings -Wcast-align -Wcast-qual \
 		-Wpointer-arith \
-		-Wdeclaration-after-statement -Wsequence-point
+		-Wdeclaration-after-statement -Wsequence-point -fno-common
 _CC_FLAGS_SH=	if ! test -d .git; then echo ""; else for f in ${_CCFLAGS}; do \
 		if echo "int main(void) { return 0;} " | \
 		${CC} $$f -S -xc -o /dev/null - ; \
--- a/net.h	Tue Sep 22 06:14:38 2009 +0000
+++ b/net.h	Thu Sep 24 21:25:54 2009 +0000
@@ -130,7 +130,7 @@
 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 *);