- 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>
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>
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>
Depending on both, GnuTLS and OpenSSL doesn't make sense, we should
use either TLS implementation but not both. Use GnuTLS for now and
get rid of OpenSSL dependency by explicitely telling the package's
build-system to do so using CONFIGURE_ARGS.
If future uses of libmicrohttpd require OpenSSL, it probably makes
most sense to build several variants of the package, i.e.
libmicrohttpd-openssl as well as libmicrohttpd-gnutls. As with most
packages making use of any TLS implementation, these are build-time
decissions resulting in conflicting variants of the same package
which cannot be installed simultanously.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
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>
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>
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>
- 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>
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>
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>
fixed sed when filtering IP address from nslookup output
because "Server:" block might have multiple address lines.
Thanks to Arjen de Korte
Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
gethostbyname_r is available when _GNU_SOURCE is defined, add a patch to check for it instead of __GLIBC__, build with -D_GNU_SOURCE, bump release number
Signed-off-by: Nicolas Thill <nico@openwrt.org>