]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Add -fno-common to debugging CFLAGS.
authorRoy Marples <roy@marples.name>
Thu, 24 Sep 2009 21:29:18 +0000 (21:29 +0000)
committerRoy Marples <roy@marples.name>
Thu, 24 Sep 2009 21:29:18 +0000 (21:29 +0000)
Declare udp_dhcp_len as extern.
Include common.h in dhcp.h to get _packed definition.
Thanks to David Wu for pointing this out.

configure
dhcp.h
net.h

index daf831021b0e628b13a1909fe9e523bdb6de5a15..7275a6e336d231a06ee222a24b94889595a5045a 100755 (executable)
--- 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 85845f04893938e4a498fa503c43c1b240210620..a53e292287909b413d9a0cb1d090df3d082a7686 100644 (file)
--- a/dhcp.h
+++ b/dhcp.h
@@ -33,6 +33,8 @@
 
 #include <stdint.h>
 
+#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 7c7c24c6b8d51e7216c702b2c53ebe33b41680f8..ba5d6d133ee82a09378471c7bc6b2c566ea7532a 100644 (file)
--- 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 *);