Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 590738

Summary: net-libs/libnet-1.1.6 with sys-libs/musl - In file included from /usr/include/linux/netdevice.h:28: /usr/include/linux/if.h:71:2: error: expected identifier (IFF_UP)
Product: Gentoo Linux Reporter: Petr Vaněk <arkamar>
Component: Current packagesAssignee: Gentoo Netmon project <netmon>
Status: RESOLVED FIXED    
Severity: normal Keywords: PATCH
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 430702    
Attachments: 1.1.6-libc.patch
libnet-1.1.6-r1.ebuild

Description Petr Vaněk gentoo-dev 2016-08-08 08:50:54 UTC
Created attachment 442756 [details, diff]
1.1.6-libc.patch

libnet fails to compile with following errors with musl:


libtool: compile:  clang -DHAVE_CONFIG_H -I. -I../include -I../include -march=native -O2 -pipe -c libnet_
link_linux.c  -fPIC -DPIC -o .libs/libnet_link_linux.o
In file included from libnet_link_linux.c:37:
In file included from /usr/include/linux/if_arp.h:26:
In file included from /usr/include/linux/netdevice.h:28:
/usr/include/linux/if.h:71:2: error: expected identifier
        IFF_UP                          = 1<<0,  /* sysfs */
        ^
/usr/include/net/if.h:29:16: note: expanded from macro 'IFF_UP'
#define IFF_UP  0x1
                ^
In file included from libnet_link_linux.c:37:
In file included from /usr/include/linux/if_arp.h:26:
In file included from /usr/include/linux/netdevice.h:28:
/usr/include/linux/if.h:72:2: error: expected identifier
        IFF_BROADCAST                   = 1<<1,  /* __volatile__ */
        ^
/usr/include/net/if.h:30:23: note: expanded from macro 'IFF_BROADCAST'
#define IFF_BROADCAST 0x2
                      ^

This issue was fixed in upstream and I suggest applying this patch also to libnet-1.1.6.
Comment 1 Petr Vaněk gentoo-dev 2016-08-08 08:54:24 UTC
Created attachment 442758 [details]
libnet-1.1.6-r1.ebuild

Ebuild update. It applies the patch 1.1.6-libc.patch.
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2016-08-08 12:19:50 UTC
Comment on attachment 442758 [details]
libnet-1.1.6-r1.ebuild

--- libnet-1.1.6.ebuild 2015-12-29 07:29:27.366452299 +0100
+++ -   2016-08-08 14:19:12.498226329 +0200
@@ -23,6 +23,10 @@
        doc/{PACKET_BUILDING,PORTED,RAWSOCKET_NON_SEQUITUR,TODO}
 )

+src_prepare() {
+       epatch "${FILESDIR}/${PV}-libc.patch"
+}
+
 src_configure() {
        econf $(use_enable static-libs static)
 }