diff options
author | Jeremy Allison <jra@samba.org> | 2011-05-17 16:18:37 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2011-05-17 16:18:37 -0700 |
commit | 87a1888272127b53bab61a6e69023e67bdfca8d1 (patch) | |
tree | 0bff0227988462d93b5896157d215d1a4390f277 | |
parent | 9d9d7a7cfdcd437add3b0f1c2ec614184573c761 (diff) | |
download | samba-87a1888272127b53bab61a6e69023e67bdfca8d1.tar.gz samba-87a1888272127b53bab61a6e69023e67bdfca8d1.tar.bz2 samba-87a1888272127b53bab61a6e69023e67bdfca8d1.zip |
Fix redefinition of fstrcpy.
-rw-r--r-- | nsswitch/winbind_nss_config.h | 8 |
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 */ |