diff -r e97f864210ce external/bsd/openpam/dist/include/security/openpam.h --- a/external/bsd/openpam/dist/include/security/openpam.h Tue Apr 28 16:27:25 2020 +0000 +++ b/external/bsd/openpam/dist/include/security/openpam.h Tue Apr 28 23:31:50 2020 +0000 @@ -359,7 +359,7 @@ struct pam_module { # define PAM_SOEXT ".so" #endif -#if (defined(__GNUC__) || defined(__PCC__)) && !defined(NO_STATIC_MODULES) +#if (defined(__GNUC__) || defined(__PCC__)) && defined(OPENPAM_STATIC_MODULES) # include # ifdef __FreeBSD__ # include @@ -369,7 +369,6 @@ struct pam_module { # define SET_DECLARE(a, b) __link_set_decl(a, b) # define SET_FOREACH(a, b) __link_set_foreach(a, b) # endif -# define OPENPAM_STATIC_MODULES # define PAM_EXTERN static # define PAM_MODULE_ENTRY(name) \ static char _pam_name[] = name PAM_SOEXT; \ diff -r e97f864210ce lib/libpam/Makefile.inc --- a/lib/libpam/Makefile.inc Tue Apr 28 16:27:25 2020 +0000 +++ b/lib/libpam/Makefile.inc Tue Apr 28 23:31:50 2020 +0000 @@ -42,10 +42,6 @@ CPPFLAGS+= -DOPENPAM_MODULES_DIRECTORY=\ # No debugging #CPPFLAGS+= -DDEBUG -# ...and don't do either of those on the shared library. -# XXX CSHLIBFLAGS isn't perfect, but it'll do for now. -CSHLIBFLAGS+= -DNO_STATIC_MODULES - # Define the shared library version here. libpam and the modules share a # version, and we need these variables early for module install rules. SHLIB_MAJOR= 4 diff -r e97f864210ce lib/libpam/libpam/Makefile --- a/lib/libpam/libpam/Makefile Tue Apr 28 16:27:25 2020 +0000 +++ b/lib/libpam/libpam/Makefile Tue Apr 28 23:31:50 2020 +0000 @@ -51,6 +51,7 @@ WARNS= 6 LINTFLAGS+= -Sw -X 233 CPPFLAGS+= -DLIB_MAJ=${SHLIB_MAJOR} -DHAVE_CONFIG_H -I${.CURDIR} +CPPFLAGS+= -DOPENPAM_STATIC_MODULES #CPPFLAGS+= -DOPENPAM_DEBUG SRCS= openpam_borrow_cred.c \ diff -r e97f864210ce lib/libpam/modules/mod.mk --- a/lib/libpam/modules/mod.mk Tue Apr 28 16:27:25 2020 +0000 +++ b/lib/libpam/modules/mod.mk Tue Apr 28 23:31:50 2020 +0000 @@ -21,6 +21,7 @@ LIBDPLIBS+= pam ${NETBSDSRCDIR}/li libinstall:: ${DESTDIR}${LIBDIR}/${LIB}.so.${SHLIB_MAJOR} .else libinstall:: +CPPFLAGS+= -DOPENPAM_STATIC_MODULES .endif .include