Go to file
Rodrigo Rebello c17c29b9f8 conntrack-tools: work around build issue with musl
Building conntrack-tools with kernel headers >= 4.2 + musl fails due to
a well-known symbol clash that occurs when userspace and kernel headers
are included simultaneously (see [1], question 7, for details).

In the case of conntrack-tools, the inclusion of both 'netinet/in.h' and
'linux/in.h' occurs inside the C helper files (src/helpers/*.c)
indirectly via e.g. 'libnetfilter_conntrack/libnetfilter_conntrack.h',
which itself includes 'netinet/in.h', and 'linux/netfilter.h', which
includes 'linux/in.h' in kernel headers >= 4.2.

The approach to solving this type of conflict with musl usually involves
removing the inclusion of kernel headers or refactoring the code so as
to avoid the mentioned simultaneous inclusion. This is unfortunately
non-trivial in the case of conntrack-tools since the clashing headers
get included indirectly by headers that are strictly necessary (because
of definitions used in some helper callbacks).

Work around the issue by defining __GLIBC__ when musl is used. This
eliminates the conflicts as the kernel headers avoid redefining certain
symbols when they see __GLIBC__ defined (linux/libc-compat.h). Note that
other glibc-compatible libraries, like uClibc, already do that
internally.

Fixes:
  http://autobuild.buildroot.net/results/66e/66ec247fa0fc385bef8d2084c65bf5cad3a8e8ca/
  http://autobuild.buildroot.net/results/624/624a0d48decd819eb58cbb3c58ee904b87ebfb21/

[1] http://wiki.musl-libc.org/wiki/FAQ

Signed-off-by: Rodrigo Rebello <rprebello@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-11-30 17:20:19 +01:00
arch
board configs/arm_foundationv8: fix build and update documentation 2015-11-22 20:11:51 +01:00
boot
configs configs/arm_foundationv8: fix build and update documentation 2015-11-22 20:11:51 +01:00
docs docs/website: fix invalid links to the mailing list page 2015-11-28 18:14:45 +01:00
fs
linux
package conntrack-tools: work around build issue with musl 2015-11-30 17:20:19 +01:00
support
system
toolchain
.defconfig
.gitignore
CHANGES CHANGES: update with recent changes 2015-11-27 16:21:18 +01:00
Config.in
Config.in.legacy
COPYING
Makefile package/skeleton: also handle merged /usr in the staging 2015-11-28 23:08:33 +01:00
Makefile.legacy
README

Buildroot is a simple, efficient and easy-to-use tool to generate embedded
Linux systems through cross-compilation.

The documentation can be found in docs/manual. You can generate a text
document with 'make manual-text' and read output/docs/manual/manual.text.
Online documentation can be found at http://buildroot.org/docs.html

To build and use the buildroot stuff, do the following:

1) run 'make menuconfig'
2) select the target architecture and the packages you wish to compile
3) run 'make'
4) wait while it compiles
5) find the kernel, bootloader, root filesystem, etc. in output/images

You do not need to be root to build or run buildroot.  Have fun!

Buildroot comes with a basic configuration for a number of boards. Run
'make list-defconfigs' to view the list of provided configurations.

Please feed suggestions, bug reports, insults, and bribes back to the
buildroot mailing list: buildroot@buildroot.org
You can also find us on #buildroot on Freenode IRC.