summaryrefslogtreecommitdiff
path: root/source4/lib/replace/replace.h
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/replace/replace.h')
-rw-r--r--source4/lib/replace/replace.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/lib/replace/replace.h b/source4/lib/replace/replace.h
index 01f626390c..a6c7f3b9dd 100644
--- a/source4/lib/replace/replace.h
+++ b/source4/lib/replace/replace.h
@@ -121,12 +121,14 @@ size_t rep_strlcpy(char *d, const char *s, size_t bufsize);
size_t rep_strlcat(char *d, const char *s, size_t bufsize);
#endif
-#ifndef HAVE_STRNDUP
+#if (defined(BROKEN_STRNDUP) || !defined(HAVE_STRNDUP))
+#undef HAVE_STRNDUP
#define strndup rep_strndup
char *rep_strndup(const char *s, size_t n);
#endif
-#ifndef HAVE_STRNLEN
+#if (defined(BROKEN_STRNLEN) || !defined(HAVE_STRNLEN))
+#undef HAVE_STRNLEN
#define strnlen rep_strnlen
size_t rep_strnlen(const char *s, size_t n);
#endif