summaryrefslogtreecommitdiffstats
path: root/compat.h
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2017-03-09 15:43:08 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2017-03-09 15:43:08 +0000
commitb79df1dc29c5ca3181be3e6e642f6c51e951e34e (patch)
tree8740f7765aeccd4559cc62f34f76094dc8853da1 /compat.h
parent180ebf02081087eec625a25c785985f5d6b5eff4 (diff)
Compat code for strndup and strnlen.
Diffstat (limited to 'compat.h')
-rw-r--r--compat.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/compat.h b/compat.h
index 5f206120..39e784dc 100644
--- a/compat.h
+++ b/compat.h
@@ -247,6 +247,16 @@ size_t strlcpy(char *, const char *, size_t);
size_t strlcat(char *, const char *, size_t);
#endif
+#ifndef HAVE_STRNLEN
+/* strnlen.c */
+size_t strnlen(const char *, size_t);
+#endif
+
+#ifndef HAVE_STRNDUP
+/* strndup.c */
+char *strndup(const char *, size_t);
+#endif
+
#ifndef HAVE_DAEMON
/* daemon.c */
int daemon(int, int);