nwrap: catch NULL list in nwrap_add_hname_add_to_existing
[kai/samba-autobuild/.git] / nsswitch / winbind_nss_config.h
index 9231e3cf1be67542765cb9b27ecd76234856baf5..fb3299d58a48b66f7eba75ad64a6928e2bf8ee94 100644 (file)
 #undef SIZEOF_LONG
 #endif
 
-/*
- * we don't need socket wrapper
- * nor nss wrapper here and we don't
- * want to depend on swrap_close()
- * so we better disable both
- */
-#define SOCKET_WRAPPER_NOT_REPLACE
-#define NSS_WRAPPER_NOT_REPLACE
-
 /* Include header files from data in config.h file */
 
 #ifndef NO_CONFIG_H
 #ifndef FSTRING_LEN
 #define FSTRING_LEN 256
 typedef char fstring[FSTRING_LEN];
-#define fstrcpy(d,s) strlcpy((d),(s) ? (s) : "",sizeof(fstring))
+#ifndef fstrcpy
+#define fstrcpy(d,s) \
+do { \
+        const char *_fstrcpy_src = (const char *)(s); \
+        strlcpy((d),_fstrcpy_src ? _fstrcpy_src : "",sizeof(fstring)); \
+} while (0)
+#endif
 #endif
 
 /* Some systems (SCO) treat UNIX domain sockets as FIFOs */