From f95b8e7f2b4bc3e1cbd45c74437b5a573332029c Mon Sep 17 00:00:00 2001 From: Mark Reynolds Date: Jan 29 2018 14:37:49 +0000 Subject: Ticket 49552 - Fix build issues on F28 Description: The newer version of gcc on F28 is stricter with linking. Also, unistd.h no longer includes the "unix crypt", so we need to revert to crypt.h Added these LDFLAGS to the spec file: -Wl,-z,defs https://pagure.io/389-ds-base/issue/49552 Reviewed by: firstyear & lslebodn (Thanks!!) --- diff --git a/Makefile.am b/Makefile.am index 0ec12a3..34efb07 100644 --- a/Makefile.am +++ b/Makefile.am @@ -182,7 +182,7 @@ endif #end hpux # If any interfaces have been added since the last public release, then increment age. # If any interfaces have been removed or changed since the last public release, then set age to 0. -SDS_LDFLAGS = $(NSPR_LINK) -version-info 0:0:0 +SDS_LDFLAGS = $(NSPR_LINK) $(NSS_LINK) -lpthread -version-info 0:0:0 NUNCSTANS_LDFLAGS = $(NSPR_LINK) $(EVENT_LINK) -version-info 1:0:1 SLAPD_LDFLAGS = -version-info 1:0:1 @@ -1100,7 +1100,8 @@ libldaputil_la_SOURCES = lib/ldaputil/cert.c \ lib/ldaputil/vtable.c libldaputil_la_CPPFLAGS = $(AM_CPPFLAGS) $(DSPLUGIN_CPPFLAGS) $(DSINTERNAL_CPPFLAGS) -I$(srcdir)/lib/ldaputil - +libldaputil_la_LIBADD = libslapd.la $(NSS_LINK) $(NSPR_LINK) +libldaputil_la_LDFLAGS = $(AM_LDFLAGS) #//////////////////////////////////////////////////////////////// # @@ -2387,7 +2388,7 @@ if HAVE_DOXYGEN doxyfile.stamp: cd $(srcdir); $(DOXYGEN) $(abs_top_builddir)/docs/slapi.doxy - rm $(abs_top_builddir)/man/man3/_* + rm -f $(abs_top_builddir)/man/man3/_* touch doxyfile.stamp # Add the docs to make all. diff --git a/ldap/servers/plugins/pwdstorage/crypt_pwd.c b/ldap/servers/plugins/pwdstorage/crypt_pwd.c index 3bd2265..a72da47 100644 --- a/ldap/servers/plugins/pwdstorage/crypt_pwd.c +++ b/ldap/servers/plugins/pwdstorage/crypt_pwd.c @@ -24,11 +24,9 @@ #ifndef __USE_XOPEN #define __USE_XOPEN /* linux */ #endif /* __USE_XOPEN */ -#include -#else /* hpux */ -#include -#endif /* hpux */ +#endif +#include #include "pwdstorage.h" static PRLock *cryptlock = NULL; /* Some implementations of crypt are not thread safe. ie. ours & Irix */ diff --git a/rpm/389-ds-base.spec.in b/rpm/389-ds-base.spec.in index 4542ea4..d99d2de 100644 --- a/rpm/389-ds-base.spec.in +++ b/rpm/389-ds-base.spec.in @@ -302,7 +302,7 @@ autoreconf -fiv --with-systemdsystemconfdir=%{_sysconfdir}/systemd/system \ --with-systemdgroupname=%{groupname} \ $NSSARGS $TCMALLOC_FLAGS $ASAN_FLAGS $RUST_FLAGS $PERL_FLAGS \ - --enable-cmocka + --enable-cmocka 'LDFLAGS=-Wl,-z,defs' %if 0%{?rhel} >= 8 || 0%{?fedora} make setup.py