X-Git-Url: https://git.eyrie.org/?a=blobdiff_plain;f=portable%2Fmacros.h;fp=portable%2Fmacros.h;h=cf4c4a26d5dfd8d98f592e8fb660c3fe85490879;hb=510f358be6a968b5640b0b554118a08aa554d8cf;hp=5d77fb75af7bd8465308dc4cac47d4f53a9ab08f;hpb=42bbbcfb783fe4e2e698b31472ed640d49baed8c;p=kerberos%2Fkrb5-strength.git diff --git a/portable/macros.h b/portable/macros.h index 5d77fb7..cf4c4a2 100644 --- a/portable/macros.h +++ b/portable/macros.h @@ -5,7 +5,7 @@ * which can be found at . * * Written by Russ Allbery - * Copyright 2015 Russ Allbery + * Copyright 2015, 2022 Russ Allbery * Copyright 2008, 2011-2012 * The Board of Trustees of the Leland Stanford Junior University * @@ -45,6 +45,16 @@ # endif #endif +/* + * Suppress the argument to __malloc__ in Clang (not supported in at least + * version 13) and GCC versions prior to 11. + */ +#if !defined(__attribute__) && !defined(__malloc__) +# if defined(__clang__) || __GNUC__ < 11 +# define __malloc__(dalloc) __malloc__ +# endif +#endif + /* * LLVM and Clang pretend to be GCC but don't support all of the __attribute__ * settings that GCC does. For them, suppress warnings about unknown