Fix redefinition of fstrcpy.
authorJeremy Allison <jra@samba.org>
Tue, 17 May 2011 23:18:37 +0000 (16:18 -0700)
committerJeremy Allison <jra@samba.org>
Tue, 17 May 2011 23:18:37 +0000 (16:18 -0700)
nsswitch/winbind_nss_config.h

index 9231e3cf1be67542765cb9b27ecd76234856baf5..e1ad3f64635fe5951a22d42d5923df3c0938ccba 100644 (file)
 #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 */