]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
lib/attr.h: exclude MCST LCC compiler from ATTR_MALLOC
authora1batross <a1ba.omarov@gmail.com>
Sun, 22 Mar 2026 10:41:03 +0000 (15:41 +0500)
committerAlejandro Colomar <foss+github@alejandro-colomar.es>
Sun, 22 Mar 2026 21:44:25 +0000 (22:44 +0100)
This particular compiler defines GCC compatibility like Clang but doesn't support this attribute.

Signed-off-by: Alibek Omarov <a1ba.omarov@gmail.com>
lib/attr.h

index dbb97082f830ae43e15fdb672551452d84f4aeb3..8a14e15b6cb2b0ed3c47d45143e96a28d17de130 100644 (file)
@@ -40,7 +40,7 @@
 # define ATTR_ALLOC_SIZE(...)
 #endif
 
-#if (__GNUC__ >= 11) && !defined(__clang__)
+#if (__GNUC__ >= 11) && !defined(__clang__) && !defined(__MCST__)
 # define ATTR_MALLOC(deallocator)    [[gnu::malloc(deallocator)]]
 #else
 # define ATTR_MALLOC(deallocator)