summaryrefslogtreecommitdiff
path: root/include/string.h
diff options
context:
space:
mode:
authorPaul Cercueil <paul@crapouillou.net>2021-02-18 22:23:18 +0000
committerWaldemar Brodkorb <wbx@openadk.org>2021-02-19 00:14:59 +0100
commit0daab1508379e23a09ab7fdb469018228d951894 (patch)
tree6e99759312203f716ff7050adb462441c6eaaf9d /include/string.h
parent0c2d4b17f983ca67d222b3af64fd2f35c4a26af9 (diff)
string.h: Make strdup() available if _USE_XOPEN2K8
The strdup() function is present in POSIX 2008.09. Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Diffstat (limited to 'include/string.h')
-rw-r--r--include/string.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/string.h b/include/string.h
index 8315203a4..5ffd97150 100644
--- a/include/string.h
+++ b/include/string.h
@@ -141,7 +141,8 @@ extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n,
libc_hidden_proto(strxfrm_l)
#endif
-#if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN_EXTENDED
+#if defined __USE_SVID || defined __USE_BSD || \
+ defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
/* Duplicate S, returning an identical malloc'd string. */
extern char *strdup (const char *__s)
__THROW __attribute_malloc__ __nonnull ((1));