aboutsummaryrefslogtreecommitdiff
path: root/include/libssh
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2018-08-29 18:41:15 +0200
committerAndreas Schneider <asn@cryptomilk.org>2018-10-17 08:23:15 +0200
commitf81ca6161223e3566ce78a427571235fb6848fe9 (patch)
tree5c9b342dab82e0bbdb466c18061259c825e7cb32 /include/libssh
parentc20b360c96a098773755e82982ec6d7dfc7ff057 (diff)
downloadlibssh-f81ca6161223e3566ce78a427571235fb6848fe9.tar.gz
libssh-f81ca6161223e3566ce78a427571235fb6848fe9.tar.xz
libssh-f81ca6161223e3566ce78a427571235fb6848fe9.zip
misc: Add strndup implementation if not provides by the OS
Fixes T112 Signed-off-by: Andreas Schneider <asn@cryptomilk.org> (cherry picked from commit 247983e9820fd264cb5a59c14cc12846c028bd08)
Diffstat (limited to 'include/libssh')
-rw-r--r--include/libssh/priv.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/libssh/priv.h b/include/libssh/priv.h
index 5a74915e..8c01f9c2 100644
--- a/include/libssh/priv.h
+++ b/include/libssh/priv.h
@@ -43,6 +43,10 @@
# endif
#endif /* !defined(HAVE_STRTOULL) */
+#if !defined(HAVE_STRNDUP)
+char *strndup(const char *s, size_t n);
+#endif /* ! HAVE_STRNDUP */
+
#ifdef HAVE_BYTESWAP_H
#include <byteswap.h>
#endif