summaryrefslogtreecommitdiffstats
path: root/src/util/macros.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/macros.h')
-rw-r--r--src/util/macros.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/util/macros.h b/src/util/macros.h
index a9867b41354..40ebf02da84 100644
--- a/src/util/macros.h
+++ b/src/util/macros.h
@@ -87,6 +87,12 @@ do { \
#define PRINTFLIKE(f, a)
#endif
+#ifdef HAVE_FUNC_ATTRIBUTE_MALLOC
+#define MALLOCLIKE __attribute__((__malloc__))
+#else
+#define MALLOCLIKE
+#endif
+
/* Used to optionally mark structures with misaligned elements or size as
* packed, to trade off performance for space.
*/