From caa2d8e29adf43bb77fc00d718f7a0db4c2c35b1 Mon Sep 17 00:00:00 2001 From: Thierry LARONDE Date: Thu, 1 Feb 2024 20:37:42 +0100 Subject: Gcc < 11 doesn't allow opt. deallocator arg for __attribute((malloc)) --- include/X11/Xauth.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') 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)) -- cgit v1.2.3