Skip to contentSkip to conversation

dhcpdump: fix build with musl

PATCH New Baruch Siach 2 participants 2 messages Aug 25, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dhcpdump: fix build with musl

muls exposes udphdr Linux member names only when _GNU_SOURCE is defined.

Fixes:
http://autobuild.buildroot.net/results/dc2/dc2902b758faa7bcfed44cca5fa73aeffdf284ae/
http://autobuild.buildroot.net/results/432/43214b5f7d9e5881fbeba7203ee7fcfc6386a492/
http://autobuild.buildroot.net/results/291/29100641731904b50d73af7cf2db08847fe1567a/

and more.

---
 package/dhcpdump/dhcpdump.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/dhcpdump/dhcpdump.mk +2 -1
index 15fc02f84511..6b677a674ae6 100644
@@ -16,7 +16,8 @@ DHCPDUMP_LIBS += `$(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs`
 endif
 
 define DHCPDUMP_BUILD_CMDS
-	$(MAKE) -C $(@D) CC="$(TARGET_CC) $(TARGET_CFLAGS)" LIBS="$(DHCPDUMP_LIBS)"
+	$(MAKE) -C $(@D) CC="$(TARGET_CC) $(TARGET_CFLAGS) -D_GNU_SOURCE" \
+		LIBS="$(DHCPDUMP_LIBS)"
 endef
 
 define DHCPDUMP_INSTALL_TARGET_CMDS
Signature · 1 line
2.5.0
#1 lore raw

PATCH 1/1 dhcpdump: fix build with musl

Dear Baruch Siach,

Quoted 7 lines · Baruch Siach

muls exposes udphdr Linux member names only when _GNU_SOURCE is defined.

Fixes:
http://autobuild.buildroot.net/results/dc2/dc2902b758faa7bcfed44cca5fa73aeffdf284ae/
http://autobuild.buildroot.net/results/432/43214b5f7d9e5881fbeba7203ee7fcfc6386a492/
http://autobuild.buildroot.net/results/291/29100641731904b50d73af7cf2db08847fe1567a/

Quoted 6 lines

and more.

---
 package/dhcpdump/dhcpdump.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Applied, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com