blob: 134884648755decd068604c636e25d0599da054c [file] [log] [blame]
From 43367ef55153c9552849611ab7f411af51641939 Mon Sep 17 00:00:00 2001
From: Stephen McGruer <smcgruer@google.com>
Date: Tues, 9 Feb 2016 15:46:49 -0500
Subject: [PATCH] Expose strdup for POSIX code
This enables strdup for code that defines _POSIX_C_SOURCE as >= 200809L, like
glibc did SIX YEARS AGO.
diff --git a/package/uclibc/0.9.33.2/uclibc-0075-expose-strdup-for-posix-source.patch b/package/uclibc/0.9.33.2/uclibc-0075-expose-strdup-for-posix-source.patch
new file mode 100644
index 0000000..e357857
--- /dev/null
+++ b/package/uclibc/0.9.33.2/uclibc-0075-expose-strdup-for-posix-source.patch
@@ -0,0 +1,12 @@
+--- a/include/string.h 2012-05-15 03:20:09.000000000 -0400
++++ b/include/string.h 2016-02-09 15:36:53.007031385 -0500
+@@ -143,7 +143,8 @@
+ #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));
+ libc_hidden_proto(strdup)