Commit Graph
100 Commits
Author SHA1 Message Date
Jo-Philipp Wich 0d18627cd2 perl: securely handle duplicate environment variables [CVE-2016-2381]
Stephane Chazelas discovered a bug in the environment handling in Perl.

Perl provides a Perl-space hash variable, %ENV, in which environment
variables can be looked up.  If a variable appears twice in envp, only
the last value would appear in %ENV, but getenv would return the first.
Perl's taint security mechanism would be applied to the value in %ENV,
but not to the other rest of the environment.  This could result in an
ambiguous environment causing environment variables to be propagated to
subprocesses, despite the protections supposedly offered by taint
checking.

With this update Perl changes the behavior to match the following:

 a) %ENV is populated with the first environment variable, as getenv
    would return.
 b) Duplicate environment entries are removed.

References:

 * http://perl5.git.perl.org/perl.git/commit/ae37b791a73a9e78dedb89fb2429d2628cf58076
 * https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-2381

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2016-03-01 17:26:51 +01:00
Jo-Philipp Wich 9f5057a175 Merge pull request #2397 from stintel/snmp
net-snmp: reload snmpd on interface events
2016-03-01 06:32:51 +01:00
Jo-Philipp Wich 6d20db9138 mosquitto: fix whitespace error introduced with 7a6a575887
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2016-01-18 09:50:37 +01:00
Jo-Philipp Wich f73e358558 perl: ensure File::Spec::canonpath() preserves taint [CVE-2015-8607]
Beginning in PathTools 3.47 and/or perl 5.20.0, the File::Spec::canonpath()
routine returned untained strings even if passed tainted input. This defect
undermines the guarantee of taint propagation, which is sometimes used to
ensure that unvalidated user input does not reach sensitive code.

This defect was found and reported by David Golden of MongoDB, and a patch
was provided by Tony Cook.

References:

 * https://rt.perl.org/Public/Bug/Display.html?id=126862
 * https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-8607

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2016-01-14 12:17:56 +01:00
Jo-Philipp Wich fd88a6d92f Merge pull request #2260 from cshore/pull-request-collectd-prevent-perl-bindings
utils/collectd:  Really prevent perl bindings
2016-01-11 10:48:55 +01:00
Jo-Philipp Wich f9bd35d0a1 Merge pull request #2240 from ollie27/libpng
libpng: update to 1.2.56
2016-01-09 13:50:02 +01:00
Jo-Philipp Wich db25cfe041 Merge pull request #2196 from jow-/master
DD: freeradius2: completely disable runtime OpenSSL version checks
2016-01-04 09:06:49 +01:00
Jo-Philipp Wich 7dadd12850 freeradius2: completely disable runtime OpenSSL version checks
Whenever we ship fixed libopenssl binaries in DD, the Freeradius daemon fails
at startup because it detects a mismatch of the build time and runtime OpenSSL
version.

Since our OpenSSL updates for DD are ABI compatible we do not need or even want
this superflous check. Removing it saves us the effort to rebuild Freeradius
after every OpenSSL version bump.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-12-28 16:25:58 +01:00
Jo-Philipp Wich b652aebd12 Merge pull request #2079 from ryzhovau/vnstat_ldflags
vnstat: respect LDFLAGS
2015-12-07 09:44:57 +01:00
Jo-Philipp Wich a4d4477c58 Merge pull request #2075 from ryzhovau/postgresql_uclibc
postgresql: now visible with uclibc
2015-12-07 09:41:15 +01:00
Jo-Philipp Wich c7ddd3140d Merge pull request #2008 from ollie27/libpngupdate
libpng: update to 1.2.54
2015-11-24 16:17:31 +01:00
Jo-Philipp Wich 24acd472d7 Merge pull request #2016 from padre-lacroix/master
bandwidthd: fix build with gcc5
2015-11-24 16:16:55 +01:00
Jo-Philipp Wich b3beb14b67 Merge pull request #2006 from dwmw2/master
collectd: enable nut plugin
2015-11-24 14:24:54 +01:00
Jo-Philipp Wich b5e7a36aa2 Merge pull request #1899 from ollie27/collectdconfd
collectd: add $(INSTALL_DIR) $(1)/etc/collectd/conf.d
2015-10-28 10:19:47 +01:00
Jo-Philipp Wich d7a44bb056 Merge pull request #1886 from jow-/python-build-depend-fix
python: fix two build depend issues
2015-10-23 14:51:23 +02:00
Jo-Philipp Wich 99484ec990 python: fix two build depend issues
Build depends must refer to the source package name, not the binary one,
therefore we need to use `bzip2` in order to enforce a build of libbz2.so.

Also make the host python build depend on the bzip2 host build in order to
ensure that host python is built with bzip2 support. We don't need a build
dependency for the target python as this already depends on +libbz2 through
python-light. That package dependency in turn implies a build dependency.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-23 14:29:41 +02:00
Jo-Philipp Wich 926b68c15d motion: fix segmentation fault under musl libc
During startup, motion calls pthread_getspecific() through motion_log()
before pthread_key_create() has been called yet. This works on glibc and
uclibc but segfaults on musl because motion is relying on undefined
behaviour here.

Move the pthread initialization before motion_startup() so that
tls_key_threadnr is initialized when motion_log() is called.

Also enforce the use of strerror_r() on musl by defining XSI_STRERROR_R
on all non-glibc systems because the supposed replacement code is broken
and crashes on musl.

References:
http://www.lavrsen.dk/foswiki/bin/view/Motion/BugReport2015x09x30x203633

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-10-08 02:15:28 +02:00
Jo-Philipp Wich c527219c9d Merge pull request #1835 from hnyman/collectd-fix-parallel
collectd: backport parallel build fix from upstream
2015-10-02 21:48:26 +02:00
Jo-Philipp Wich 7d7e1c0977 Merge pull request #1796 from kdarbyshirebryant/collectdnetlink
collectd: netlink module re-enabled
2015-10-01 20:21:05 +02:00
Jo-Philipp Wich b15ae5a9bd mac-telnet: fix build against musl
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-09-02 14:39:59 +02:00
Jo-Philipp Wich 12aa19a9bc Merge pull request #1736 from hnyman/conf-collectd
collectd: Clarify config file example/placeholder
2015-09-01 10:41:20 +02:00
Jo-Philipp Wich 6b4b26f506 Merge pull request #1670 from plntyk/fix_musl_crtmpserver
crtmpserver: fix musl build
2015-08-21 10:23:14 +02:00
Jo-Philipp Wich a137be6d8b Merge pull request #1695 from plntyk/fix_postgresql_various
Fix various postgresql issues
2015-08-21 10:20:26 +02:00
Jo-Philipp Wich ad39db848e Merge pull request #1666 from hnyman/collectd-simplify
collectd: interface plugin: revert to Linux defaults from BSD-like operations
2015-08-19 11:03:04 +02:00
Jo-Philipp Wich 9cfcbeeeac Merge pull request #1655 from dangowrt/update-postgresql
update postgresql
2015-08-13 23:52:41 +02:00
Jo-Philipp Wich 4c0ef08310 Merge pull request #1617 from MikePetullo/master
lighttpd: update to 1.4.36
2015-07-27 18:39:20 +02:00
Jo-Philipp Wich 185c195e4d Merge pull request #1575 from hnyman/collectd550
collectd: update to 5.5.0
2015-07-16 21:35:08 +02:00
Jo-Philipp Wich 2dbf4507c3 mysql: fix datadir check in init script
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-07-02 14:22:02 +02:00
Jo-Philipp Wich 38b1cf314e Merge pull request #1471 from jow-/shadowsocks-fortify-compat
shadowsocks-client: fix fortify source compatibility
2015-07-02 10:01:55 +02:00
Jo-Philipp Wich be3adfffdf Merge pull request #1496 from puleglot/master
sudo: preserve sudoers during sysupgrade
2015-07-01 21:50:56 +02:00
Jo-Philipp Wich 23dd874b10 Merge pull request #1501 from jow-/diffutils-fortify-source-compat
diffutils: fix fortify source compat
2015-07-01 10:25:35 +02:00
Jo-Philipp Wich 9c6d45f278 Merge pull request #1511 from jow-/davfs2-musl-compat
davfs2: fix musl compatibility
2015-07-01 10:15:26 +02:00
Jo-Philipp Wich dceb78b254 Merge pull request #1031 from ionum/master
net-snmp: Enable pass_persist support for snmpd in Makefile
2015-07-01 01:25:52 +02:00
Jo-Philipp Wich 35ea16f3b6 Merge pull request #1504 from hauke/boost
boost: do not fail when no shared libs were build
2015-06-30 19:41:14 +02:00
Jo-Philipp Wich f17dd769f1 mtr: fix build with globally disabled IPv6
The current mtr does not build if IPv6 is disabled globally, add a patch to
fix the build in this case.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-30 17:32:03 +02:00
Jo-Philipp Wich 2273ff7642 davfs2: fix musl compatibility
- Add header tests for `error.h`, `sys/types.h` and `sys/select.h`
 - Add function tests for `canonicalize_file_name()` and `fopencookie()`
 - Add `compat.h` header to provide replacements for `error()`,
   `error_at_line()` and `canonicalize_file_name()` as well as the
   `_PATH_MOUNTED` and `_PATH_MNTTAB` defines
 - Add missing includes for `sys/select.h` and `sys/types.h`
 - Disable libneon debugging if no `fopencookie()` implementation is
   available

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-30 12:57:51 +02:00
Jo-Philipp Wich 0169cbd3a0 ctorrent-svn: fix musl compatibility
Add missing `sys/types.h` include to `strnstr()` replacement code in
`compat.c` in order to declare `ssize_t` type under musl.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-30 11:14:34 +02:00
Jo-Philipp Wich 93b1d74c76 ctorrent: fix musl compatibility
Add missing `sys/types.h` include to `strnstr()` replacement code in
`compat.c` in order to declare `ssize_t` type under musl.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-30 11:09:46 +02:00
Jo-Philipp Wich 72a483f759 check: fix fortify source compatibility
Let `./configure` assume C99 compliant `snprintf()` and `vsnprintf()` functions
by passing the required cache variables via `CONFIGURE_VARS`.

Fixes fortify-source related undeclared function errors when compiling the
`tests/` directory.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-30 10:59:28 +02:00
Jo-Philipp Wich 1208a25e71 aiccu: fix uClibc build after #1389
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-29 19:50:01 +02:00
Jo-Philipp Wich bc4d049918 libnet-1.2.x: fix uClibc regression caused by #1410
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-29 18:00:44 +02:00
Jo-Philipp Wich d80ab67b13 diffutils: fix fortify source compat
Compile with `-std=gnu99` instead of `-std=c99` to avoid redefining
`__attribute__` in `src/system.h`.

Fixes the following error spotted by the buildbot:

    In file included from ../lib/stdio.h:43:0,
                     from cmp.c:22:
    .../staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-4.8-linaro_musl-1.1.10_eabi/include/fortify/stdio.h: In function 'snprintf':
    .../staging_dir/toolchain-arm_cortex-a9+vfpv3_gcc-4.8-linaro_musl-1.1.10_eabi/include/fortify/stdio.h:99:2: error: invalid use of '__builtin_va_arg_pack ()'
      return __orig_snprintf(__s, __n, __f, __builtin_va_arg_pack());
      ^

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-29 11:39:57 +02:00
Jo-Philipp Wich 9d423ba553 Merge pull request #1492 from tru7/linknx
linknx: fix musl compatibility
2015-06-28 14:58:24 +02:00
Jo-Philipp Wich 90a4712fd8 Merge pull request #1491 from tru7/knxd
knxd: fix musl compatibility
2015-06-28 14:57:24 +02:00
Jo-Philipp Wich be56395a63 Merge pull request #1479 from jow-/pthsem-musl-compat
pthsem: fix musl and fortify source compatibility
2015-06-28 14:50:46 +02:00
Jo-Philipp Wich 474a5bf795 screen: remove leftover Makefile code
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-27 14:31:29 +02:00
Jo-Philipp Wich 371bf39546 screen: fix autoconf misdetection
The configure script shipped by screen uses the presence of `elf.h` and `-lelf`
as indicator for an SVR4 system which implies a `#define BUGGYGETLOGIN`.

The SVR4 `getlogin()` replacement function does not compile with a musl
toolchain and we do not want it anyway, so patch configure to remove the broken
SVR4 detection logic.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-27 14:29:48 +02:00
Jo-Philipp Wich 572fd1e40b Merge pull request #1439 from mstorchak/iodine
iodine: fix musl compatibility
2015-06-27 13:30:05 +02:00
Jo-Philipp Wich 1696390af8 Merge pull request #1483 from jow-/open-plc-utils-musl-compat
open-plc-utils: fix musl and fortify source compatibility
2015-06-27 11:19:07 +02:00
Jo-Philipp Wich fdde981522 net-snmp: fix musl compatibility
Fixup `iwlib.h` to not consider an musl environment to be an unsupported
platform.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-26 17:47:33 +02:00
Jo-Philipp Wich d9e391bbce Merge pull request #1480 from jow-/postfix-musl-compat
postfix: fix musl compatibility
2015-06-26 17:28:40 +02:00
Jo-Philipp Wich cbf11196b7 ntpd: fix fortify source compatibility
The ntpd package ships autoconf macros which attempt to test for the C99
compliance of `snprintf()` and `vsnprintf()`.

Those macros unconditionally consider the functions not compliant in a cross
compile setting and therfore break all subsequent configure tests because
the `snprintf` and `vsnprintf` symbols are shadowed with `#define` directives
redirecting them to their respectiv gnulib replacements.

The fortify source headers in turn will `#undef` those defines when wrapping
the associated functions and therfore cause all `conftest` programs to emit
a failure.

Pass the required magic autoconf cache variables via `CONFIGURE_VARS` to let
`./configure` assume C99 compliance of the affected functions, thus fixing
the build.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-26 17:17:13 +02:00
Jo-Philipp Wich e10abaf165 ntripclient: fix musl comaptibility
Add missing `sys/select.h` include to `ntripclient.c` to provide
declarations for `struct timeval` and `fd_set` under musl.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-26 16:48:26 +02:00
Jo-Philipp Wich d3c279d4f6 open-plc-utils: fix musl and fortify source compatibility
- Include `poll.h` at the top of `ether/readpacket.c` to avoid nested
   declaration errors caused by fortify source headers
 - Add missing `sys/select.h` include to `serial/serial.c`

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-26 16:41:26 +02:00
Jo-Philipp Wich e86ca8c6e1 Merge pull request #1464 from jow-/c-ares-fortify-source-fix
c-ares: fix build with CONFIG_PKG_FORTIFY_SOURCE*
2015-06-26 15:51:15 +02:00
Jo-Philipp Wich a187bc8d57 opennhrp: fix musl compatibility
- Add `fcntl.h` to `nrhp/opennhrp.c` for `open()`, `O_WRONLY` etc.
 - Add missing `sys/types.h` include to `nrhp/nrhp_common.h` to provide
   required `u_int*_t` types under musl

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-26 15:48:25 +02:00
Jo-Philipp Wich 940c522cf6 lm-sensors: fix musl compatibility
Only use `asm/io.h` for uClibc, else include `sys/io.h`

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-26 15:10:03 +02:00
Jo-Philipp Wich abcadcbede postfix: fix musl compatibility
The current package patches `makedefs` to probe for the existance
of the `nsl` and `resolv` libraries but uses the wrong variables
for the prefix, leading to `makedefs` probing the host directories,
not the staging dir ones.

Replace `$PKG_BUILD_DIR` with `$STAGING_DIR` to perform the library
tests in the correct directory.

Fixes the following error spotted by doing test builds against musl
which does not provide a `libnsl`:

    .../mips-openwrt-linux-musl/bin/ld: cannot find -lnsl
    collect2: error: ld returned 1 exit status
    make: *** [master] Error 1

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-26 14:55:33 +02:00
Jo-Philipp Wich f1fbc7f51e pthsem: fix musl and fortify source compatibility
This commit addresses two issues encountered while building pthsem for
x86_64/musl:

1) Autoconf incorrectly assumes a broken Glibc and thus falls back
   to Linux compatibility code which runs into an unsupported
   platform error with musl libc. Since musl provides a proper
   implementation of `sigaltstack(2)`, force configure to use the
   POSIX compliant code when musl libc is used.

2) The `pth_syscall.c` file undefines various libc function names
   which breaks the indirection set up by fortify-source headers,
   therefore forcibly disable fortify source in the OpenWrt Makefile.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-26 12:13:03 +02:00
Jo-Philipp Wich a89c0cadcf shadowsocks-client: fix fortify source compatibility
The shadowsocks source uses the name `encrypt` which is already reserved by
the `unistd.h` header. Rename the local `encrypt` and `decrypt` functions to
`crypto_encrypt` and `crypto_decrypt` in order to prevent clashes with the
standard headers.

Fixes the following build error oberserved on the buildbot:

    In file included from client.c:19:0:
    crypto.h:18:5: error: conflicting types for 'encrypt'
     int encrypt(int sockfd, struct link *ln);
         ^
    In file included from .../staging_dir/toolchain-mipsel_mips32_gcc-4.8-linaro_musl-1.1.10/include/fortify/unistd.h:20:0,
                     from client.c:12:
    .../staging_dir/toolchain-mipsel_mips32_gcc-4.8-linaro_musl-1.1.10/include/unistd.h:145:6: note: previous declaration of 'encrypt' was here
     void encrypt(char *, int);
          ^
    make[3]: *** [sslocal] Error 1

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-25 18:02:37 +02:00
Jo-Philipp Wich eaf4652760 snort: fix build with CONFIG_PKG_CHECK_FORMAT_SECURITY
The configure script incorrectly mangles `CFLAGS` by attempting to remove
`-Werror` from it, thus turning `-Werror=format-security` into just
`=format-security` which will cause subsequent autoconf tests to fail.

Patch out the custom `CFLAGS` mangling to fix the build.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-25 17:29:22 +02:00
Jo-Philipp Wich 321043ede9 Merge pull request #1468 from jow-/sstp-client-musl-compat
sstp-client: fix musl compatibility
2015-06-25 16:44:52 +02:00
Jo-Philipp Wich 768f1a42ae squid: fix musl compatibility
Change `sys/signal.h` include to just `signal.h`. The build otherwise fails
due to `-Werror` with the following message:

    In file included from rfcnb-io.c:43:0:
    .../staging_dir/toolchain-mipsel_mips32_gcc-4.8-linaro_musl-1.1.10/include/sys/signal.h:1:2: error: #warning redirecting incorrect #include <sys/signal.h> to <signal.h> [-Werror=cpp]
     #warning redirecting incorrect #include <sys/signal.h> to <signal.h>
      ^
    cc1: all warnings being treated as errors

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-25 16:44:11 +02:00
Jo-Philipp Wich 419637e17f sstp-client: fix musl compatibility
- Ship a `net/ppp_defs.h` replacement header since musl does not provide one
   but `pppd/pppd.h` provided by pppd is needing it.
 - Add missing `sys/types.h` includes

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-25 16:31:58 +02:00
Jo-Philipp Wich 757de70511 usb: fix musl compatibility
Replace the nonstandard `SIGCLD` signal name with the proper `SIGCHLD` spelling
as the `SIGCLD` alias is not provided by musl.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-25 14:49:52 +02:00
Jo-Philipp Wich 2e73fcd4b0 c-ares: fix build with CONFIG_PKG_FORTIFY_SOURCE*
When fortify source is enabled, the c-ares configure script will abort with:
    configure: CFLAGS error: CFLAGS may only be used to specify C compiler flags, not macro definitions. Use CPPFLAGS for: -D_FORTIFY_SOURCE=1

Change the OpenWrt Makefile to move any -D flags from TARGET_CFLAGS to
TARGET_CPPFLAGS in order to satisfy `configure`.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-25 12:57:36 +02:00
Jo-Philipp Wich 5325329b53 Merge pull request #1407 from jow-/wifidog-musl-compat
wifidog: fix musl compatibility
2015-06-24 13:50:57 +02:00
Jo-Philipp Wich f0cb183834 Merge pull request #1387 from jow-/etherwake-musl-compat
etherwake: fix musl compatibility
2015-06-24 13:50:00 +02:00
Jo-Philipp Wich 44d7aa7789 Merge pull request #1426 from jow-/tinc-musl-compat
tinc: fix musl compatibility
2015-06-19 16:03:08 +02:00
Jo-Philipp Wich a9277215a9 Merge pull request #1427 from jow-/tgt-musl-compat
tgt: fix musl compatibility
2015-06-19 12:21:26 +02:00
Jo-Philipp Wich 23bd12a89a Merge pull request #1416 from jow-/vpnc-musl-compat
vpnc: fix musl compatibility
2015-06-18 23:51:28 +02:00
Jo-Philipp Wich 431ad5f682 sysstat: fix musl compatibility
Add missing `limits.h` and `sys/types.h` includes to the appropriate
source files.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-18 20:42:37 +02:00
Jo-Philipp Wich b2aba46406 tcsh: fix musl compatibility
Avoid using `union wait` under musl as it does not provide this definition.
Implement solution suggested by http://www.openwall.com/lists/musl/2013/06/21/4

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-18 20:33:40 +02:00
Jo-Philipp Wich e55822ec2b tgt: fix musl compatibility
- Include `sys/user.h` if `__WORDSIZE` is undefined
 - Add `fcntl.h` to `libscc.c` in order to declare `loff_t`

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-18 20:18:15 +02:00
Jo-Philipp Wich 4004ec2c75 tinc: fix musl compatibility
Let configure include `sys/if_tun.h` when testing for `netinet/if_ether.h`
to detect the Kernel/libc header conflict on musl.

After this patch, configure will correctly detect `netinet/if_ether.h` as
unusable and the subsequent compilation will not attempt to use it.

Fixes the following compatibility error:

	In file included from .../staging_dir/toolchain-mips_mips32_gcc-4.8-linaro_musl-1.1.9/include/linux/if_tun.h:20:0,
	                 from linux/device.c:24:
	.../staging_dir/toolchain-mips_mips32_gcc-4.8-linaro_musl-1.1.9/include/linux/if_ether.h:137:8: error: redefinition of 'struct ethhdr'
	 struct ethhdr {
	        ^
	In file included from .../staging_dir/toolchain-mips_mips32_gcc-4.8-linaro_musl-1.1.9/include/net/ethernet.h:10:0,
	                 from linux/../have.h:180,
	                 from linux/../system.h:26,
	                 from linux/device.c:21:
	.../staging_dir/toolchain-mips_mips32_gcc-4.8-linaro_musl-1.1.9/include/netinet/if_ether.h:96:8: note: originally defined here
	 struct ethhdr {
	        ^
	make[5]: *** [linux/device.o] Error 1

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-18 19:51:59 +02:00
Jo-Philipp Wich 54e6887881 mtr: switch to upstream "newdns" branch
Switch the mtr package to the upstream `newdns` git branch.

This will fix compilation on Glibc, uClibc and musl without requiring
further patches.

Note that the base version of this branch is 0.85, not 0.86 so the
lower version number is intentional.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-18 18:35:22 +02:00
Jo-Philipp Wich d5c31e1bf3 ulogd: fix musl compatibility
- Avoid non-pointer use of `FILE` type since its just a forward declaration
 - Build with -D_GNU_SOURCE to expose required `struct tcphdr` members

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-18 17:30:30 +02:00
Jo-Philipp Wich 38d8e72cbc Merge pull request #1415 from papaj0e/master
vnstat: fix musl compatibility
2015-06-18 00:30:39 +02:00
Jo-Philipp Wich b3c3ccc10a vpnc: fix musl compatibility
- Add missing `sys/ttydefaults.h` include to `config.c`
 - Restrict usage of `error.h` to glibc and uclibc only
 - Avoid including `linux/if_tun.h` on non-glibc/uclibc to prevent
   musl kernel/libc header conflicts

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-18 00:30:21 +02:00
Jo-Philipp Wich c83350fd91 libdaq: fix musl compatibility
Change occurences of `sys/unistd.h` to the standard `unistd.h` include.
Fixes build against musl.

Also refresh existing patch since it applied with fuzz.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-17 23:47:52 +02:00
Jo-Philipp Wich e4925c1efd libnet-1.2.x: fix musl compatiblity
The correct includes for musl are protected by an __GLIBC__ check in the
upstream sources.

Since musl does not provide own defines to identify itself, simply invert
the condition to !__UCLIBC__ in order to fix the build on all libc flavors
supported by OpenWrt.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-17 23:36:41 +02:00
Jo-Philipp Wich d379979793 Merge pull request #1408 from jow-/screen-musl-compat
screen: fix musl compatibility
2015-06-17 22:41:27 +02:00
Jo-Philipp Wich e0f8adcb0a Merge pull request #1405 from jow-/zabbix-musl-compat
zabbix: fix musl compatibility
2015-06-17 22:41:05 +02:00
Jo-Philipp Wich e838c7f736 screen: fix musl compatibility
Add missing `os.h` include to `utmp.c` to pull in the required `utmp.h` header.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-17 20:01:59 +02:00
Jo-Philipp Wich 2b5856ae72 wifidog: fix musl compatibility
- Fix missing `fcntl.h` in `protocol.c`
 - Replace nonstandard `sys/unistd.h` includes with `unistd.h` ones

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-17 19:41:42 +02:00
Jo-Philipp Wich 644ae71ebc xinetd: fix musl compatibility
Pass HAVE_RLIM_T via TARGET_CPPFLAGS since configure uses that define
but never actually declares it.

Without doing that, `config.h` tries to declare `rlim_t` itself which
leads to `config.h:126:16: error: 'long long long' is too long for GCC`
with musl on at least x86_64.

Also refresh patches while we're at it.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-17 19:31:03 +02:00
Jo-Philipp Wich c3f0347649 zabbix: fix musl compatibility
Under musl a compilation unit cannot include both linux/kernel.h
and sys/sysinfo.h at the same time since that leads to a redefinition
of `struct sysinfo`.

Change the autoconf template to include linux/kernel.h while testing
for sys/sysinfo.h to test for that conflict.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-17 19:13:44 +02:00
Jo-Philipp Wich 508e19a190 keepalived: fix musl compatibility
- Add missing sys/types.h include to provide u_short type under musl

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-17 18:28:23 +02:00
Jo-Philipp Wich f9ac3e632b perl: fix musl compatibility
- Add patch to inhibit the libm IEEE math switch on musl
 - Add postprocessing for config.sh to the Makefile to fixup
   defines for musl, idea taken
   from http://patchwork.openembedded.org/patch/91707/

This is the least invasive approach I could come up to fix the build
failure asap. Another possibility is maintaining yet another set of
musl specific architecture config files, but I think that this introduces
a lot of maintenance overhead.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-17 17:42:00 +02:00
Jo-Philipp Wich d94d9bd232 Merge pull request #1392 from jow-/bridge-must-compat
bridge-utils: fix musl compatibility
2015-06-17 02:31:50 +02:00
Jo-Philipp Wich ba31ff7d5e pptpd: fix musl compatibility
- Ship a net/ppp_defs.h replacement header since musl does not provide one
   but pppd/pppd.h provided by pppd is needing it.
 - Replace deprecated MSG_TRYHARD flag with the proper MSG_DONTROUTE one
 - Unconditionally include string.h in bcrelay to avoid undeclared memset()
   and strcpy() warnings.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-17 00:12:42 +02:00
Jo-Philipp Wich b10600d9aa Merge pull request #1389 from jow-/aiccu-musl-compat
aiccu: fix musl compatibility
2015-06-16 19:42:09 +02:00
Jo-Philipp Wich c10f93b913 bridge-utils: fix musl compatibility
Add missing includes to libbridge.h to define struct timeval and the
required u_int*_t types under musl.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-16 19:39:25 +02:00
Jo-Philipp Wich d028771f28 avrdude: fix musl compatibility
- Build with -D_GNU_SOURCE to expose "loff_t" required for libelf.h
 - Include sys/types.h before usb.h to provide missing u_int*_t types

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-16 19:26:52 +02:00
Jo-Philipp Wich e39e96d089 aiccu: fix musl compatibility
- Fix redefinition of struct ethhdr
- Restrict the use of res_ninit() and res_nquery() to glibc
- Fix a warning in dn_skipname.c by declaring ns_name_skip() static
- Refresh patches

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-16 16:35:47 +02:00
Jo-Philipp Wich e76f394fdc etherwake: fix musl compatibility
Always include net/ethernet.h instead linux specific headers,
fixes compilation with musl libc.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-16 15:08:27 +02:00
Jo-Philipp Wich a0968faedb socat: fix musl compatibility
Do not include netinet/if_ether.h for musl to prevent struct ethhdr
redeclarations.

Also define NETDB_INTERNAL if needed to fix compilation of the network
backends.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-16 14:58:28 +02:00
Jo-Philipp Wich acfce97879 picocom: fix compilation with musl (#1383)
Only use termio.h with glibc or uclibc, for musl include sys/ioctl.h and
termios.h instead.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-06-16 14:39:44 +02:00
Jo-Philipp Wich f5ca16f98d nfs-kernel-server: revert CONFIG_IPV6 handling
Building nfs-kernel-server with --enable-ipv6 requires not yet packaged
libtirpc, therfore unconditionally disable IPv6 support again for now.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-05-29 17:41:33 +02:00
Jo-Philipp Wich 9e2788c96b Merge pull request #1181 from ryzhovau/ipv6_opt
Optional IPv6 support
2015-05-27 18:49:06 +02:00