]> granicus.if.org Git - libnl/commit
FTBFS with musl libc: Missing includes
authorIsaac <ibid_ag@lavabit.com>
Sun, 13 May 2012 05:37:48 +0000 (22:37 -0700)
committerThomas Graf <tgraf@redhat.com>
Sun, 13 May 2012 09:18:28 +0000 (11:18 +0200)
commit996b502961976d04f058664d5083f121eb61ce4a
tree687e0cb9ef11dd92428d8829939d05721506ab1f
parentfec10a282355def49133e63b8a4591cc51b46478
FTBFS with musl libc: Missing includes

Hello,
libnl 3.2.9 does not build with musl libc, without patching.
I' using a current musl libc (http://www.etalabs.net/musl/)
with linux 2.6.32 headers.
At first there were a couple problems on the musl side, but those are
resolved.
However, I found some other issues:
First, two files were missing
#include <byteswap.h>:
lib/netfilter/log_msg.c
lib/netfilter/queue_msg.c
These files used __bswap_64 (which should be bswap_64), a macro
declared in byteswap.h

Second, I got this error after fixing that:

In file included from nf-queue.c:16:
./include/linux/netfilter.h:53: error: field in has incomplete type
./include/linux/netfilter.h:54: error: field in6 has incomplete type

I found that src/nf-queue.c is missing an
#include <netinet/in.h>

Attached is a patch which resolves these issues.  I've tested with both
musl and glibc, and it builds cleanly on both.
lib/netfilter/ct.c
lib/netfilter/log_msg.c
lib/netfilter/queue_msg.c
src/nf-queue.c