diff options
-rw-r--r-- | include/X11/Xauth.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/X11/Xauth.h b/include/X11/Xauth.h index bd558eb..51e913f 100644 --- a/include/X11/Xauth.h +++ b/include/X11/Xauth.h @@ -78,7 +78,12 @@ _XFUNCPROTOBEGIN #endif #if __has_attribute(malloc) -# define XAU_MALLOC_ATTRIBUTE(X) __attribute__((malloc X)) +# if defined(__clang__) +/* Clang does not support the optional deallocator argument */ +# define XAU_MALLOC_ATTRIBUTE(X) __attribute__((malloc)) +# else +# define XAU_MALLOC_ATTRIBUTE(X) __attribute__((malloc X)) +# endif #else # define XAU_MALLOC_ATTRIBUTE(X) #endif |