about summary refs log tree commit diff
path: root/malloc/malloc.h
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2020-08-31 11:14:01 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2020-08-31 14:22:06 -0300
commit30e5069c7d4b51288d3e6f75f53a6ad2f5e71b0f (patch)
tree8239f1fe135d1374cb8109b8f7c1152f46038dbf /malloc/malloc.h
parent306bdd99834204d0d70985c39382d2c42a619a09 (diff)
downloadglibc-30e5069c7d4b51288d3e6f75f53a6ad2f5e71b0f.tar.gz
glibc-30e5069c7d4b51288d3e6f75f53a6ad2f5e71b0f.tar.xz
glibc-30e5069c7d4b51288d3e6f75f53a6ad2f5e71b0f.zip
malloc: Fix mallinfo deprecation declaration
It fixes the build issue below introduced by e3960d1c57e57 (Add
mallinfo2  function that support sizes >= 4GB).  It moves the
__MALLOC_DEPRECATED to the usual place for function attributes:

  In file included from ../include/malloc.h:3,
                   from ../sysdeps/x86_64/multiarch/../../../test-skeleton.c:31,
                   from ../sysdeps/x86_64/multiarch/test-multiarch.c:96:
  ../malloc/malloc.h:118:1: error: empty declaration [-Werror]
    118 | __MALLOC_DEPRECATED;

It also adds the required deprecated warning suppression on the tests.

Checked on x86_64-linux-gnu.
Diffstat (limited to 'malloc/malloc.h')
-rw-r--r--malloc/malloc.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/malloc/malloc.h b/malloc/malloc.h
index e25b33462a..b2371f7704 100644
--- a/malloc/malloc.h
+++ b/malloc/malloc.h
@@ -115,8 +115,7 @@ struct mallinfo2
 };
 
 /* Returns a copy of the updated current mallinfo. */
-__MALLOC_DEPRECATED;
-extern struct mallinfo mallinfo (void) __THROW;
+extern struct mallinfo mallinfo (void) __THROW __MALLOC_DEPRECATED;
 
 /* Returns a copy of the updated current mallinfo. */
 extern struct mallinfo2 mallinfo2 (void) __THROW;