]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
mtrace: Add attribute nocommon to mallwatch
authorTulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
Fri, 2 Jul 2021 21:12:13 +0000 (18:12 -0300)
committerTulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
Fri, 2 Jul 2021 21:14:01 +0000 (18:14 -0300)
Avoid compilation errors GCC versions that do not default to
-fno-common, e.g. GCC <= 9.

Fixes commit 00d28960c5388a582a0485e07629b553c32dde49 ("mtrace:
Deprecate mallwatch and tr_break").

Suggested-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Suggested-by: Florian Weimer <fweimer@redhat.com>
malloc/mtrace.c

index 6c2c58b7061f2b2cc3dfd41d391a4b25de1e38fb..f5b8321c6bcf83e1cbbeda27cc4ceb7075792200 100644 (file)
@@ -59,7 +59,7 @@ __libc_lock_define_initialized (static, lock);
    case some applications ended up linking against them but they don't actually
    do anything anymore; not that they did much before anyway.  */
 
-void *mallwatch;
+void *mallwatch __attribute__ ((nocommon));
 compat_symbol (libc, mallwatch, mallwatch, GLIBC_2_0);
 
 void