summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorThierry LARONDE <tlaronde@kergis.com>2024-02-01 20:37:42 +0100
committerThierry LARONDE <tlaronde@kergis.com>2024-02-01 20:37:42 +0100
commitcaa2d8e29adf43bb77fc00d718f7a0db4c2c35b1 (patch)
treea864e230ee4c760aca61839bc1019aba52b58241 /include
parentf4fc44202b554e68093828b556f8c7fd9644ddb0 (diff)
Gcc < 11 doesn't allow opt. deallocator arg for __attribute((malloc))
Diffstat (limited to 'include')
-rw-r--r--include/X11/Xauth.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/X11/Xauth.h b/include/X11/Xauth.h
index 51e913f..7b9a23d 100644
--- a/include/X11/Xauth.h
+++ b/include/X11/Xauth.h
@@ -78,8 +78,8 @@ _XFUNCPROTOBEGIN
#endif
#if __has_attribute(malloc)
-# if defined(__clang__)
-/* Clang does not support the optional deallocator argument */
+# if defined(__clang__) || (defined(__GNUC__) && __GNUC__ < 11)
+/* Clang or gcc do not support the optional deallocator argument */
# define XAU_MALLOC_ATTRIBUTE(X) __attribute__((malloc))
# else
# define XAU_MALLOC_ATTRIBUTE(X) __attribute__((malloc X))