From: Daan De Meyer Date: Fri, 23 May 2025 11:32:52 +0000 (+0200) Subject: fundamental: Move declaration of free() to macro-fundamental.h X-Git-Tag: v258-rc1~499^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a119c648f8219d73f4331fd53ecfb569d0ca2f45;p=thirdparty%2Fsystemd.git fundamental: Move declaration of free() to macro-fundamental.h Let's put it together with the macro that needs it (mfree()). Also, get rid of the unnecessary include in iovec-util-fundamental.h. --- diff --git a/src/fundamental/iovec-util-fundamental.h b/src/fundamental/iovec-util-fundamental.h index 4c86197e6f7..024dd9bf78c 100644 --- a/src/fundamental/iovec-util-fundamental.h +++ b/src/fundamental/iovec-util-fundamental.h @@ -2,7 +2,6 @@ #pragma once #if !SD_BOOT -#include #include #endif @@ -15,10 +14,6 @@ struct iovec { void *iov_base; size_t iov_len; }; - -DISABLE_WARNING_REDUNDANT_DECLS; -void free(void *p); -REENABLE_WARNING; #endif /* This accepts both const and non-const pointers */ diff --git a/src/fundamental/macro-fundamental.h b/src/fundamental/macro-fundamental.h index 6a75d7864a9..69bbeead483 100644 --- a/src/fundamental/macro-fundamental.h +++ b/src/fundamental/macro-fundamental.h @@ -396,6 +396,10 @@ assert_cc(sizeof(long long) == sizeof(intmax_t)); */ #define STRLEN(x) (sizeof(""x"") - sizeof(typeof(x[0]))) +DISABLE_WARNING_REDUNDANT_DECLS; +void free(void *p); +REENABLE_WARNING; + #define mfree(memory) \ ({ \ free(memory); \