Go to file
Jo-Philipp Wich bd949ea29f lttng-tools: musl compile fixes
Add two patches to address three distinct build problems spotted by our
build bots when compiling lttng-tools:

1) unconditional use of `__GLIBC_PREREQ`

On musl based toolchains there is no such macro defined, leading to the
following preprocessor error:

      CC       compat-epoll.lo
    In file included from compat-epoll.c:33:0:
    poll.h:76:19: error: missing binary operator before token "("
     #if __GLIBC_PREREQ(2, 9)

2) undeclared `mode_t` type

On musl based toolchains the `mode_t` type is not implicitely defined through
other includes, leading to the following compile error:

      CC       hashtable.lo
    In file included from ../../../src/common/common.h:24:0,
                     from hashtable.c:24:
    ../../../src/common/runas.h:25:46: error: unknown type name 'mode_t'
     int run_as_mkdir_recursive(const char *path, mode_t mode, uid_t uid, gid_t gid);
                                                  ^
    ../../../src/common/runas.h:26:36: error: unknown type name 'mode_t'
     int run_as_mkdir(const char *path, mode_t mode, uid_t uid, gid_t gid);
                                        ^
    ../../../src/common/runas.h:27:46: error: unknown type name 'mode_t'
     int run_as_open(const char *path, int flags, mode_t mode, uid_t uid, gid_t gid);
                                                  ^

3) multiple definitions

The header files declare several `const char *` pointers which are initialized
in various `*.c` files later on. Due to a missing `extern` declaration in the
header, the final linking of the executables fails with errors such as:

      CCLD     lttng
    ../../../src/common/.libs/libcommon.a(mi-lttng.o):(.data.rel.ro.local+0x0): multiple definition of `mi_lttng_element_snapshots'
    commands/enable_events.o:(.bss+0x18): first defined here
    collect2: error: ld returned 1 exit status

This commits addresses these issues with two patches, `100-musl-compat.patch`
fixes issue 1 by declaring a fallback dummy declaration of `__GLIBC_PREREQ` and
issue 2 by explicitely including `sys/stat.h` which provides `mode_t` according
to POSIX.

The second patch, `200-use-extern.patch` declares all char pointers in the
header file as `extern`, fixing the observed linker errors.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-05-20 14:07:28 +02:00
admin debootstrap: update to version 1.0.80 2016-04-19 14:04:51 +02:00
devel lttng-tools: musl compile fixes 2016-05-20 14:07:28 +02:00
ipv6 all: get rid of kmod-ipv6 dependencies 2015-10-06 09:04:29 +02:00
kernel/exfat-nofuse exfat-nofuse: update version 2016-02-01 12:17:47 +01:00
lang node-hid: fix compile error 2016-05-18 14:54:38 +09:00
libs tiff: fix wrong declaration of ftell() compat macro 2016-05-19 14:29:57 +02:00
mail Merge pull request #2694 from dibdot/ssmtp 2016-05-13 10:19:30 +03:00
multimedia icecast: update to 2.4.3 2016-05-16 00:10:33 +02:00
net openconnect: avoid possible implicit dependency on liblz4 2016-05-19 11:41:44 +02:00
sound mocp: fix ncurses dependency 2016-05-11 12:52:47 +02:00
utils mc: apply gettext version fixup 2016-05-19 14:03:14 +02:00
CONTRIBUTING.md CONTRIBUTING.md: Add advice about pull requests 2015-11-20 16:32:52 +02:00
LICENSE Add GPLv2 pro-forma license 2014-06-16 08:14:04 +02:00
README.md Fixed broken link in README.md 2015-07-10 13:51:22 -05:00

README.md

OpenWrt packages feed

Description

This is the OpenWrt "packages"-feed containing community-maintained build scripts, options and patches for applications, modules and libraries used within OpenWrt.

Installation of pre-built packages is handled directly by the opkg utility within your running OpenWrt system or by using the OpenWrt SDK on a build system.

Usage

This repository is intended to be layered on-top of an OpenWrt buildroot. If you do not have an OpenWrt buildroot installed, see the documentation at: OpenWrt Buildroot Installation on the OpenWrt support site.

This feed is enabled by default. To install all its package definitions, run:

./scripts/feeds update packages
./scripts/feeds install -a -p packages

License

See LICENSE file.

Package Guidelines

See CONTRIBUTING.md file.