summaryrefslogtreecommitdiffstats
path: root/src/config.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.h')
-rw-r--r--src/config.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/config.h b/src/config.h
index 7dd9dc2..ed9a869 100644
--- a/src/config.h
+++ b/src/config.h
@@ -253,10 +253,10 @@ typedef long double max_align_t;
* Annotates allocator-like functions.
*/
#if __has_attribute(malloc)
-# if __clang__
-# define attr_malloc(...) attr_nodiscard __attribute__((malloc))
-# else
+# if __GNUC__ >= 11
# define attr_malloc(...) attr_nodiscard __attribute__((malloc(__VA_ARGS__)))
+# else
+# define attr_malloc(...) attr_nodiscard __attribute__((malloc))
# endif
#else
# define attr_malloc(...) attr_nodiscard