aboutsummaryrefslogtreecommitdiff
path: root/GTMDefines.h
diff options
context:
space:
mode:
Diffstat (limited to 'GTMDefines.h')
-rw-r--r--GTMDefines.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/GTMDefines.h b/GTMDefines.h
index 5a41e6e..c295848 100644
--- a/GTMDefines.h
+++ b/GTMDefines.h
@@ -341,8 +341,12 @@
#endif
#ifndef GTM_NONNULL
- #if __has_attribute(nonnull)
- #define GTM_NONNULL(x) __attribute__((nonnull x))
+ #if defined(__has_attribute)
+ #if __has_attribute(nonnull)
+ #define GTM_NONNULL(x) __attribute__((nonnull x))
+ #else
+ #define GTM_NONNULL(x)
+ #endif
#else
#define GTM_NONNULL(x)
#endif