summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nsswitch/winbind_nss_config.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/nsswitch/winbind_nss_config.h b/nsswitch/winbind_nss_config.h
index 9231e3cf1b..e1ad3f6463 100644
--- a/nsswitch/winbind_nss_config.h
+++ b/nsswitch/winbind_nss_config.h
@@ -54,7 +54,13 @@
#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 */