summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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 c0bfb15a47a..9ddf675965b 100644
--- a/src/util/macros.h
+++ b/src/util/macros.h
@@ -154,6 +154,12 @@ do { \
#define ATTRIBUTE_PURE
#endif
+#ifdef HAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL
+#define ATTRIBUTE_RETURNS_NONNULL __attribute__((__returns_nonnull__))
+#else
+#define ATTRIBUTE_RETURNS_NONNULL
+#endif
+
#ifdef __cplusplus
/**
* Macro function that evaluates to true if T is a trivially