summaryrefslogtreecommitdiffstats
path: root/nsswitch/winbind_nss_config.h
diff options
context:
space:
mode:
Diffstat (limited to 'nsswitch/winbind_nss_config.h')
-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 3e2ce68252a..e1ad3f64635 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) safe_strcpy((d),(s),sizeof(fstring)-1)
+#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 */