diff options
author | Max Rees <maxcrees@me.com> | 2019-07-18 06:15:43 -0400 |
---|---|---|
committer | Max Rees <maxcrees@me.com> | 2019-08-07 18:07:49 -0500 |
commit | 420a64fe15922629a54e7d38cdedbf1fc86ee8ff (patch) | |
tree | 2b526e9b9426734eff19ca295dd42a91f37811a1 /experimental/elfutils/musl-strndupa.patch | |
parent | 17ca3641eaad94f05d1c9f66593c67e425268050 (diff) | |
download | packages-420a64fe15922629a54e7d38cdedbf1fc86ee8ff.tar.gz packages-420a64fe15922629a54e7d38cdedbf1fc86ee8ff.tar.bz2 packages-420a64fe15922629a54e7d38cdedbf1fc86ee8ff.tar.xz packages-420a64fe15922629a54e7d38cdedbf1fc86ee8ff.zip |
experimental/elfutils: new package
Diffstat (limited to 'experimental/elfutils/musl-strndupa.patch')
-rw-r--r-- | experimental/elfutils/musl-strndupa.patch | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/experimental/elfutils/musl-strndupa.patch b/experimental/elfutils/musl-strndupa.patch new file mode 100644 index 000000000..e48fa2018 --- /dev/null +++ b/experimental/elfutils/musl-strndupa.patch @@ -0,0 +1,18 @@ +--- a/src/unstrip.c 2017-04-27 14:26:26.000000000 +0000 ++++ b/src/unstrip.c 2017-05-05 15:51:33.515154220 +0000 +@@ -56,6 +56,15 @@ + # define _(str) gettext (str) + #endif + ++#ifndef strndupa ++#define strndupa(s, n) \ ++ (__extension__ ({const char *__in = (s); \ ++ size_t __len = strnlen (__in, (n)) + 1; \ ++ char *__out = (char *) alloca (__len); \ ++ __out[__len-1] = '\0'; \ ++ (char *) memcpy (__out, __in, __len-1);})) ++#endif ++ + /* Name and version of program. */ + ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; + |