libnspr: fix link error with musl toolchains
authorSergio Prado <sergio.prado@e-labworks.com>
Tue, 5 Jan 2016 23:48:36 +0000 (21:48 -0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 27 Jan 2016 22:56:21 +0000 (23:56 +0100)
commit390d559db3ed485994602c21db0d22a546aa3181
tree452c59541e203d7d9cc905b7b218e4d4da2ba5cd
parent802123c6248a7a4712b564897cfc5eb94173e7c6
libnspr: fix link error with musl toolchains

When linking against libnspr with musl toolchains we get undefined
references to `getprotobyname_r' and `getprotobynumber_r', for example
when compiling libnss:

/home/test/autobuild/instance-1/output/host/usr/arm-buildroot-linux-musleabihf/sysroot/usr/lib/libnspr4.so:
undefined reference to `getprotobyname_r'
/home/test/autobuild/instance-1/output/host/usr/arm-buildroot-linux-musleabihf/sysroot/usr/lib/libnspr4.so:
undefined reference to `getprotobynumber_r'

That's because musl does not have an implementation of these functions,
so we need to enable their internal implementation from libnspr.

This patch was backported from Alpine Linux commit
a162da839db0d3f8be94a5c1ad2e2e54e691c38a.

Fixes:
http://autobuild.buildroot.net/results/6052538d10779a21ac242d61bb43a371497ec684/
http://autobuild.buildroot.net/results/d62ea7dbe68188d073b4f176e6a354e95a8bab97/
http://autobuild.buildroot.net/results/ae50521c485371cd59bc4ee7e8f323169c7d513d/
...

Signed-off-by: Sergio Prado <sergio.prado@e-labworks.com>
Tested-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/libnspr/0003-enable-internal-getproto-functions-for-musl.patch [new file with mode: 0644]