nwrap: Fix the build on FreeBSD
authorAndreas Schneider <asn@samba.org>
Fri, 20 Nov 2015 07:51:49 +0000 (08:51 +0100)
committerMichael Adam <obnox@samba.org>
Mon, 11 Jan 2016 11:25:32 +0000 (12:25 +0100)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
lib/nss_wrapper/nss_wrapper.c

index a6ca81637ffe3dda29b361a6855a5da37f5afe3c..a8c97e1a461f3a95866f0b55a4e9abc76d9e8971 100644 (file)
@@ -5551,6 +5551,7 @@ void nwrap_destructor(void)
                nwrap_pw_global.num = 0;
        }
 
+#if defined(HAVE_SHADOW_H) && defined(HAVE_GETSPNAM)
        if (nwrap_sp_global.cache != NULL) {
                struct nwrap_cache *c = nwrap_sp_global.cache;
 
@@ -5562,6 +5563,7 @@ void nwrap_destructor(void)
 
                nwrap_sp_global.num = 0;
        }
+#endif /* defined(HAVE_SHADOW_H) && defined(HAVE_GETSPNAM) */
 
        if (nwrap_he_global.cache != NULL) {
                struct nwrap_cache *c = nwrap_he_global.cache;