kumquat-buildroot/package/libnss
Giulio Benetti de676e0d27 package/libnss: fix build failure on RHEL 7 using -DLINUX
NSS Makefile emits -DLINUX to OS_CFLAGS only if OS_TEST=Linux when
building for Target. But nsinstall.c is a host utility and it uses
NATIVE_FLAGS instead of OS_CFLAGS, this is why -DLINUX is not emitted.
This is necessary for the case one builds for Target OS Linux on a Host
OS that is not Linux.

After discussing upstream [*], it turned out that our current patch,
introduced with commit fe4b47a121 (package/libnss: fix build failure
on RHEL 7) to fix the bug, is wrong. The best way to fix it is to append
-DLINUX to NATIVE_FLAGS in libnss.mk.

[*] https://bugzilla.mozilla.org/show_bug.cgi?id=1603398

So let's append -DLINUX to NATIVE_FLAGS after HOST_CFLAGS to make sure
<getopt.h> is included, since in nsintall.c it is included only if LINUX
macro is defined and this caused the build failure not finding getopt
functions and macros in some build environment(i.e. RHEL 7). On other
build environments getopt.h is indirectly included by unistd.h this is
why it worked on them.

This reverts commit fe4b47a121.

Fixes:
    http://autobuild.buildroot.net/results/797/797f07ff757e7972d8c96b6a9f6abe68d17e0808/

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
[yann.morin.1998@free.fr:
  - meld the two commits into one
  - update and rearrange the commit log accordingly
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2020-01-08 22:58:28 +01:00
..
0001-add-zlib-include-dir-variable.patch package/libnss: remove patch 2019-12-23 23:44:42 +01:00
0002-Bug-1602743-Fix-PowerPc-build-sys-auxv.h-failure.patch package/libnss: bump to version 3.49 2020-01-07 21:07:50 +01:00
Config.in package/libnss: fix build failure on PowerPC, PowerPC64 2020-01-01 19:24:48 +01:00
libnss.hash package/libnss: bump to version 3.49 2020-01-07 21:07:50 +01:00
libnss.mk package/libnss: fix build failure on RHEL 7 using -DLINUX 2020-01-08 22:58:28 +01:00
nss.pc.in