diff options
Diffstat (limited to 'security/nss')
-rw-r--r-- | security/nss/lib/nss/config.mk | 7 | ||||
-rw-r--r-- | security/nss/lib/nss/nssinit.c | 5 |
2 files changed, 9 insertions, 3 deletions
diff --git a/security/nss/lib/nss/config.mk b/security/nss/lib/nss/config.mk index c18b1c6ae..607f3a215 100644 --- a/security/nss/lib/nss/config.mk +++ b/security/nss/lib/nss/config.mk @@ -97,3 +97,10 @@ ifeq ($(OS_TARGET),SunOS) # dependencies (libsoftokn3.so) in the same directory where it resides. MKSHLIB += -R '$$ORIGIN' endif + +ifeq (,$(filter-out WINNT WIN95,$(OS_TARGET))) +# Export 'mktemp' to be backward compatible with NSS 3.2.x and 3.3.x. +# See bug 142575. +DEFINES += -DWIN32_NSS3_DLL_COMPAT +DLLFLAGS += -EXPORT:mktemp=nss_mktemp +endif diff --git a/security/nss/lib/nss/nssinit.c b/security/nss/lib/nss/nssinit.c index a0f3f66e4..9ef35d704 100644 --- a/security/nss/lib/nss/nssinit.c +++ b/security/nss/lib/nss/nssinit.c @@ -59,16 +59,15 @@ * definition (in DBM) was moved from nss3.dll to softokn3.dll * in NSS 3.4. See bug 142575. */ -#ifdef WIN32 +#ifdef WIN32_NSS3_DLL_COMPAT #include <io.h> +/* exported as 'mktemp' */ char * nss_mktemp(char *path) { return _mktemp(path); } - -#pragma comment(linker, "/export:mktemp=_nss_mktemp") #endif #define NSS_MAX_FLAG_SIZE sizeof("readOnly")+sizeof("noCertDB")+ \ |