diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-16 18:08:41 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-16 18:08:41 +0000 |
commit | e31cc1efd724903b9cfeca5c070978113586ed28 (patch) | |
tree | 59e1fe0085540c2dd20a2ffa171f0bb8c732f7d4 /src/fundamental/macro-fundamental.h | |
parent | Adding upstream version 256. (diff) | |
download | systemd-e31cc1efd724903b9cfeca5c070978113586ed28.tar.xz systemd-e31cc1efd724903b9cfeca5c070978113586ed28.zip |
Adding upstream version 256.1.upstream/256.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/fundamental/macro-fundamental.h')
-rw-r--r-- | src/fundamental/macro-fundamental.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/fundamental/macro-fundamental.h b/src/fundamental/macro-fundamental.h index 5ccbda5..8aca5f7 100644 --- a/src/fundamental/macro-fundamental.h +++ b/src/fundamental/macro-fundamental.h @@ -517,6 +517,10 @@ static inline uint64_t ALIGN_OFFSET_U64(uint64_t l, uint64_t ali) { } \ } +/* Restriction/bug (see above) was fixed in GCC 15 and clang 19.*/ +#if __GNUC__ >= 15 || (defined(__clang__) && __clang_major__ >= 19) +#define DECLARE_FLEX_ARRAY(type, name) type name[]; +#else /* Declare a flexible array usable in a union. * This is essentially a work-around for a pointless constraint in C99 * and might go away in some future version of the standard. @@ -528,6 +532,7 @@ static inline uint64_t ALIGN_OFFSET_U64(uint64_t l, uint64_t ali) { dummy_t __empty__ ## name; \ type name[]; \ } +#endif /* Declares an ELF read-only string section that does not occupy memory at runtime. */ #define DECLARE_NOALLOC_SECTION(name, text) \ |