aboutsummaryrefslogtreecommitdiffstats
path: root/musl/patches-in-mcm/gcc-13.2.0/0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2024-09-07 14:55:46 +0000
committerLaurent Bercot <ska@appnovation.com>2024-09-07 14:55:46 +0000
commit1559cbe1ebcea1dac3f5c3a40a51efedd7766ffc (patch)
tree8a8d1e0c31e3328c9897c3727a555c693ef8a2fc /musl/patches-in-mcm/gcc-13.2.0/0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch
downloadToolchainFactory-1559cbe1ebcea1dac3f5c3a40a51efedd7766ffc.tar.gz
Initial commit
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'musl/patches-in-mcm/gcc-13.2.0/0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch')
-rw-r--r--musl/patches-in-mcm/gcc-13.2.0/0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/musl/patches-in-mcm/gcc-13.2.0/0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch b/musl/patches-in-mcm/gcc-13.2.0/0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch
new file mode 100644
index 0000000..f56d41a
--- /dev/null
+++ b/musl/patches-in-mcm/gcc-13.2.0/0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch
@@ -0,0 +1,28 @@
+From aaa029bcee68298695b7c4278c90b6bc320d098c Mon Sep 17 00:00:00 2001
+From: Ariadne Conill <ariadne@dereferenced.org>
+Date: Fri, 21 Aug 2020 06:52:07 +0000
+Subject: [PATCH 10/35] Don't declare asprintf if defined as a macro.
+
+---
+ include/libiberty.h | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/include/libiberty.h b/include/libiberty.h
+index 1d5c779fcff..19e3cb1e31c 100644
+--- a/include/libiberty.h
++++ b/include/libiberty.h
+@@ -652,8 +652,11 @@ extern void *bsearch_r (const void *, const void *,
+ /* Like sprintf but provides a pointer to malloc'd storage, which must
+ be freed by the caller. */
+
++/* asprintf may be declared as a macro by glibc with __USE_FORTIFY_LEVEL. */
++#ifndef asprintf
+ extern int asprintf (char **, const char *, ...) ATTRIBUTE_PRINTF_2;
+ #endif
++#endif
+
+ /* Like asprintf but allocates memory without fail. This works like
+ xmalloc. */
+--
+2.41.0
+