summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2009-09-24 21:25:54 +0000
committerRoy Marples <roy@marples.name>2009-09-24 21:25:54 +0000
commitd4f49adb0eaa2b2ef02122e9f880209e22018352 (patch)
tree4753015a27935ae1c32ef0bb9bb63d94924ac3c3
parent748aa04425913755fe40f428ff56b56d1a7ba293 (diff)
downloaddhcpcd-d4f49adb0eaa2b2ef02122e9f880209e22018352.tar.xz
Add -fno-common to debugging CFLAGS.
Declare udp_dhcp_len as extern. Include common to get _packed definition.
-rw-r--r--dhcp.h2
-rw-r--r--mk/cc.mk2
-rw-r--r--net.h2
3 files changed, 4 insertions, 2 deletions
diff --git a/dhcp.h b/dhcp.h
index 85845f04..a53e2922 100644
--- 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/mk/cc.mk b/mk/cc.mk
index 0d572d3a..380cffd0 100644
--- 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 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 *);