]> eyrie.org Git - kerberos/krb5-strength.git/blobdiff - portable/macros.h
New upstream version 3.3
[kerberos/krb5-strength.git] / portable / macros.h
index 5d77fb75af7bd8465308dc4cac47d4f53a9ab08f..cf4c4a26d5dfd8d98f592e8fb660c3fe85490879 100644 (file)
@@ -5,7 +5,7 @@
  * which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
  *
  * Written by Russ Allbery <eagle@eyrie.org>
- * Copyright 2015 Russ Allbery <eagle@eyrie.org>
+ * Copyright 2015, 2022 Russ Allbery <eagle@eyrie.org>
  * Copyright 2008, 2011-2012
  *     The Board of Trustees of the Leland Stanford Junior University
  *
 #    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