From 0daab1508379e23a09ab7fdb469018228d951894 Mon Sep 17 00:00:00 2001 From: Paul Cercueil Date: Thu, 18 Feb 2021 22:23:18 +0000 Subject: string.h: Make strdup() available if _USE_XOPEN2K8 The strdup() function is present in POSIX 2008.09. Signed-off-by: Paul Cercueil --- include/string.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)); -- cgit v1.2.3