misc: Add strndup implementation if not provides by the OS

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
(cherry picked from commit 247983e982)
This commit is contained in:
Andreas Schneider
2018-08-29 18:41:15 +02:00
parent e473108e1b
commit 27cf0ea06b
4 changed files with 29 additions and 0 deletions

View File

@@ -44,6 +44,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