changeset 1791:884724c280fc draft

Cosmetic issue: strndup is in posix-2008.
author Rob Landley <rob@landley.net>
date Wed, 16 Sep 2015 17:10:34 -0500
parents 8e8c05ca582b
children 23cb10ca9797
files sources/patches/uClibc-strndup.patch
diffstat 1 files changed, 17 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sources/patches/uClibc-strndup.patch	Wed Sep 16 17:10:34 2015 -0500
@@ -0,0 +1,17 @@
+strndup() is posix-2008. Don't require defining "gnu gnu gnu GNU gnu GNU!!! gnu I invented oxygen gnu mine MINE mine GNU bwahahaha" to get the prototype.
+
+diff -ruN uClibc/include/string.h uClibc.bak/include/string.h
+--- uClibc/include/string.h	2012-05-15 02:20:09.000000000 -0500
++++ uClibc.bak/include/string.h	2015-09-15 17:39:49.544614373 -0500
+@@ -152,11 +152,9 @@
+ /* Return a malloc'd copy of at most N bytes of STRING.  The
+    resultant string is terminated even if no null terminator
+    appears before STRING[N].  */
+-#if defined __USE_GNU
+ extern char *strndup (__const char *__string, size_t __n)
+      __THROW __attribute_malloc__ __nonnull ((1));
+ libc_hidden_proto(strndup)
+-#endif
+ 
+ #if defined __USE_GNU && defined __GNUC__
+ /* Duplicate S, returning an identical alloca'd string.  */