changeset 1425:77763a864887 draft

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.
author Roy Marples <roy@marples.name>
date Thu, 24 Sep 2009 21:29:18 +0000
parents 21d566ab5385
children 685f8c5f70be
files configure dhcp.h net.h
diffstat 3 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/configure	Tue Sep 22 06:26:04 2009 +0000
+++ b/configure	Thu Sep 24 21:29:18 2009 +0000
@@ -142,6 +142,7 @@
 CFLAGS+=	-Winline -Wwrite-strings -Wcast-align -Wcast-qual
 CFLAGS+=	-Wpointer-arith
 CFLAGS+=	-Wdeclaration-after-statement -Wsequence-point
+CFLAGS+=	-fno-common
 EOF
 fi
 
--- a/dhcp.h	Tue Sep 22 06:26:04 2009 +0000
+++ b/dhcp.h	Thu Sep 24 21:29:18 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/net.h	Tue Sep 22 06:26:04 2009 +0000
+++ b/net.h	Thu Sep 24 21:29:18 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 *);