]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
include: make system headers self contained
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 23 Jun 2025 03:02:50 +0000 (12:02 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 24 Jun 2025 14:22:32 +0000 (23:22 +0900)
Let's not include any non-system headers in system headers.

src/basic/include/malloc.h

index 96051805438b05b1153008732bfde31a63c41eb3..d0080b6cbc02fba52838f03064864b5e5507b0ae 100644 (file)
@@ -3,8 +3,6 @@
 
 #include_next <malloc.h>
 
-#include "macro.h"
-
 #if !HAVE_MALLINFO2
 struct mallinfo2 {
         size_t arena;    /* non-mmapped space allocated from system */
@@ -20,9 +18,10 @@ struct mallinfo2 {
 };
 
 static inline struct mallinfo2 mallinfo2(void) {
-DISABLE_WARNING_DEPRECATED_DECLARATIONS
+        _Pragma("GCC diagnostic push");
+        _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"");
         struct mallinfo m = mallinfo();
-REENABLE_WARNING
+        _Pragma("GCC diagnostic pop");
 
         return (struct mallinfo2) {
                 .arena = m.arena,