git.samba.org
/
gd
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9d9d7a7
)
Fix redefinition of fstrcpy.
author
Jeremy Allison
<jra@samba.org>
Tue, 17 May 2011 23:18:37 +0000
(16:18 -0700)
committer
Jeremy Allison
<jra@samba.org>
Tue, 17 May 2011 23:18:37 +0000
(16:18 -0700)
nsswitch/winbind_nss_config.h
patch
|
blob
|
history
diff --git
a/nsswitch/winbind_nss_config.h
b/nsswitch/winbind_nss_config.h
index 9231e3cf1be67542765cb9b27ecd76234856baf5..e1ad3f64635fe5951a22d42d5923df3c0938ccba 100644
(file)
--- 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 */