diff options
| author | Marek Vasut <marex@denx.de> | 2021-06-03 19:10:40 +0200 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2021-06-03 16:47:04 -0700 |
| commit | 30148b33b5d750702d7749ac59d8d740d8cb7024 (patch) | |
| tree | 80a2e9c14c7ed84eecc0e66785d1ea4a1c18d206 /meta-oe/recipes-support | |
| parent | 7e392ce174272e24758fc7741cd0e9bd03862c62 (diff) | |
| download | meta-openembedded-30148b33b5d750702d7749ac59d8d740d8cb7024.tar.gz | |
nss: Fix build on Centos 7
Centos 7 has glibc 2.18 and nss-native build fails due to implicit
declaration of function putenv during build. This is because of the
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
putenv(): _XOPEN_SOURCE
|| /* Glibc since 2.19: */ _DEFAULT_SOURCE
|| /* Glibc versions <= 2.19: */ _SVID_SOURCE
and because nss coreconf/Linux.mk only defines
-D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_SOURCE
So on such system with glibc 2.18, neither macro makes putenv()
available. Add -D_XOPEN_SOURCE for the Centos 7 and glibc 2.18
native build case.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Armin Kuster <akuster808@gmail.com>
Cc: Armin Kuster <akuster@mvista.com>
Cc: Khem Raj <raj.khem@gmail.com>
Cc: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: Ross Burton <ross.burton@arm.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support')
| -rw-r--r-- | meta-oe/recipes-support/nss/nss_3.64.bb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/nss/nss_3.64.bb b/meta-oe/recipes-support/nss/nss_3.64.bb index fce5a856ee..d4d7a87338 100644 --- a/meta-oe/recipes-support/nss/nss_3.64.bb +++ b/meta-oe/recipes-support/nss/nss_3.64.bb | |||
| @@ -45,6 +45,8 @@ TDS = "${S}/tentative-dist-staging" | |||
| 45 | 45 | ||
| 46 | TARGET_CC_ARCH += "${LDFLAGS}" | 46 | TARGET_CC_ARCH += "${LDFLAGS}" |
| 47 | 47 | ||
| 48 | CFLAGS_append_class-native = " -D_XOPEN_SOURCE " | ||
| 49 | |||
| 48 | do_configure_prepend_libc-musl () { | 50 | do_configure_prepend_libc-musl () { |
| 49 | sed -i -e '/-DHAVE_SYS_CDEFS_H/d' ${S}/nss/lib/dbm/config/config.mk | 51 | sed -i -e '/-DHAVE_SYS_CDEFS_H/d' ${S}/nss/lib/dbm/config/config.mk |
| 50 | } | 52 | } |
