0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch (883B)
1 From 190064993cd8ddbd48015c1fc1916e4110a97733 Mon Sep 17 00:00:00 2001 2 From: Ariadne Conill <ariadne@dereferenced.org> 3 Date: Fri, 21 Aug 2020 06:52:07 +0000 4 Subject: [PATCH] Don't declare asprintf if defined as a macro. 5 6 --- 7 include/libiberty.h | 3 +++ 8 1 file changed, 3 insertions(+) 9 10 diff --git a/include/libiberty.h b/include/libiberty.h 11 index a65ced9c820..eb20ab0f95f 100644 12 --- a/include/libiberty.h 13 +++ b/include/libiberty.h 14 @@ -652,8 +652,11 @@ extern void *bsearch_r (const void *, const void *, 15 /* Like sprintf but provides a pointer to malloc'd storage, which must 16 be freed by the caller. */ 17 18 +/* asprintf may be declared as a macro by glibc with __USE_FORTIFY_LEVEL. */ 19 +#ifndef asprintf 20 extern int asprintf (char **, const char *, ...) ATTRIBUTE_PRINTF_2; 21 #endif 22 +#endif 23 24 /* Like asprintf but allocates memory without fail. This works like 25 xmalloc. */