From 87a1888272127b53bab61a6e69023e67bdfca8d1 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 17 May 2011 16:18:37 -0700 Subject: Fix redefinition of fstrcpy. --- nsswitch/winbind_nss_config.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 */ -- cgit