]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Add -fno-common to debugging CFLAGS.
authorRoy Marples <roy@marples.name>
Thu, 24 Sep 2009 21:25:54 +0000 (21:25 +0000)
committerRoy Marples <roy@marples.name>
Thu, 24 Sep 2009 21:25:54 +0000 (21:25 +0000)
Declare udp_dhcp_len as extern.
Include common to get _packed definition.

dhcp.h
mk/cc.mk
net.h

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
index 0d572d3a89898600f6c0ea6b6b24f13b7dfa40d6..380cffd0529668202b83a4724be62c53f46732f7 100644 (file)
--- a/mk/cc.mk
+++ b/mk/cc.mk
@@ -18,7 +18,7 @@ _CCFLAGS=     -Wall -Wextra -Wimplicit -Wshadow -Wformat=2 \
                -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 - ; \
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 *);