From 06c9f534e2293f7da7f3b812cd265f8f55f7b39a Mon Sep 17 00:00:00 2001 From: Hugh McMaster Date: May 09 2019 11:35:00 +0000 Subject: Remove the nss3 path prefix from the cert.h C preprocessor source file inclusion Bug Description: The NSS header cert.h resides in different paths on different operating systems. Hardcoding a path prefix as #include caused fatal compile-time errors on some operating systems, such as Debian, because the C preprocessor could not find the header. Fix Description: Removing the 'nss3' path prefix allows compilation to succeed, as the compiler can locate cert.h in the NSS include path detected by pkg-config. Changes to rpm/389-ds-base.spec.in included at the request of Matus Honek in https://pagure.io/389-ds-base/pull-request/50352 Author: Hugh McMaster Reviewed by: firstyear, mhonek, mreynolds Remove NSS header and library path hacks from the rpm package spec file Patch suggested by Matus Honek in https://pagure.io/389-ds-base/pull-request/50352 --- diff --git a/include/ldaputil/certmap.h b/include/ldaputil/certmap.h index 50fd4d1..26d1733 100644 --- a/include/ldaputil/certmap.h +++ b/include/ldaputil/certmap.h @@ -16,7 +16,7 @@ /* What was extcmap.h begins ... */ #include -#include +#include #ifndef NSAPI_PUBLIC #define NSAPI_PUBLIC diff --git a/lib/ldaputil/examples/init.c b/lib/ldaputil/examples/init.c index fd1edc9..b10473a 100644 --- a/lib/ldaputil/examples/init.c +++ b/lib/ldaputil/examples/init.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include "certmap.h" /* Public Certmap API */ #include "plugin.h" /* must define extern "C" functions */ diff --git a/rpm/389-ds-base.spec.in b/rpm/389-ds-base.spec.in index d1ea161..d5b6464 100644 --- a/rpm/389-ds-base.spec.in +++ b/rpm/389-ds-base.spec.in @@ -333,8 +333,6 @@ CLANG_FLAGS="--enable-clang" %endif %{?with_tmpfiles_d: TMPFILES_FLAG="--with-tmpfiles-d=%{with_tmpfiles_d}"} -# hack hack hack https://bugzilla.redhat.com/show_bug.cgi?id=833529 -NSSARGS="--with-nss-lib=%{_libdir} --with-nss-inc=%{_includedir}/nss3" %if %{use_asan} && !%{use_rust} ASAN_FLAGS="--enable-asan --enable-debug" @@ -379,7 +377,7 @@ autoreconf -fiv --with-systemdsystemconfdir=%{_sysconfdir}/systemd/system \ --with-systemdgroupname=%{groupname} \ --libexecdir=%{_libexecdir}/%{pkgname} \ - $NSSARGS $ASAN_FLAGS $MSAN_FLAGS $TSAN_FLAGS $UBSAN_FLAGS $RUST_FLAGS $PERL_FLAGS $CLANG_FLAGS \ + $ASAN_FLAGS $MSAN_FLAGS $TSAN_FLAGS $UBSAN_FLAGS $RUST_FLAGS $PERL_FLAGS $CLANG_FLAGS \ --enable-cmocka \ --enable-perl