Skip to contentSkip to conversation

libnet:explicitly pass libnet_cv_have_packet_socket=yes

PATCH New Joris Lijssens 2 participants 2 messages Nov 12, 2015 – Nov 16, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libnet:explicitly pass libnet_cv_have_packet_socket=yes

---
 package/libnet/libnet.mk | 1 +
 1 file changed, 1 insertion(+)
package/libnet/libnet.mk +1 -0
index 3b62a79..ab825a4 100644
@@ -7,6 +7,7 @@
 LIBNET_VERSION = 1.1.6
 LIBNET_SITE = http://sourceforge.net/projects/libnet-dev/files
 LIBNET_INSTALL_STAGING = YES
+LIBNET_CONF_OPTS = libnet_cv_have_packet_socket=yes
 LIBNET_LICENSE = BSD-2c, BSD-3c
 LIBNET_LICENSE_FILES = doc/COPYING
 
Signature · 1 line
1.8.3.1
#1 lore raw

PATCH 1/1 libnet:explicitly pass libnet_cv_have_packet_socket=yes

Quoted 10 lines · Joris Lijssens
---
 package/libnet/libnet.mk | 1 +
 1 file changed, 1 insertion(+)
package/libnet/libnet.mk +0 -0
index 3b62a79..ab825a4 100644

package/libnet/libnet.mk line 10

Quoted 4 lines
package/libnet/libnet.mk +1 -0
@@ -7,6 +7,7 @@
 LIBNET_VERSION = 1.1.6
 LIBNET_SITE = http://sourceforge.net/projects/libnet-dev/files
 LIBNET_INSTALL_STAGING = YES
+LIBNET_CONF_OPTS = libnet_cv_have_packet_socket=yes

Unfortunately, this breaks the build for musl toolchains. Both the autoconf
test and the actual code in src/libnet_link_linux.c have stupid __GLIBC__ checks which make it include linux/if_ether.h instead of the toolchain header, and that triggers a failure because of multiple definitions. The fundamental solution is to add AC_CHECK_HEADERS of netinet/if_ether.h and act accordingly. But for me it's sufficient to just make it:

# PF_PACKET is always available on Linux, but build breaks for musl ifneq ($(BR2_TOOLCHAIN_USES_MUSL),y)
LIBNET_CONF_OPTS = libnet_cv_have_packet_socket=yes endif

Regards,
Arnout

Quoted 4 lines
package/libnet/libnet.mk +0 -0
 LIBNET_LICENSE = BSD-2c, BSD-3c
 LIBNET_LICENSE_FILES = doc/COPYING
 
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF