Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 590738 - 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)
Summary: net-libs/libnet-1.1.6 with sys-libs/musl - In file included from /usr/include...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: musl-porting
  Show dependency tree
 
Reported: 2016-08-08 08:50 UTC by Petr Vaněk
Modified: 2016-08-08 13:09 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
1.1.6-libc.patch (1.1.6-libc.patch,1.41 KB, patch)
2016-08-08 08:50 UTC, Petr Vaněk
Details | Diff
libnet-1.1.6-r1.ebuild (libnet-1.1.6-r1.ebuild,1.03 KB, text/plain)
2016-08-08 08:54 UTC, Petr Vaněk
Details

Note You need to log in before you can comment on or make changes to this bug.
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)
 }