aboutsummaryrefslogtreecommitdiffstats
path: root/include/serd/serd.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-01-10 19:19:00 +0100
committerDavid Robillard <d@drobilla.net>2021-01-10 19:19:00 +0100
commit92dc0c4e224c33938daeaff0661ead3764e503f8 (patch)
tree4fc3aa3474d90fda34015938c30c26600a838575 /include/serd/serd.h
parentaabedb5acb69755f9f259d338c3c2e68ef957ca7 (diff)
downloadserd-92dc0c4e224c33938daeaff0661ead3764e503f8.tar.gz
serd-92dc0c4e224c33938daeaff0661ead3764e503f8.tar.bz2
serd-92dc0c4e224c33938daeaff0661ead3764e503f8.zip
Only use nullability attributes on clang 7 and newer
These have existed for longer, but the names were changed.
Diffstat (limited to 'include/serd/serd.h')
-rw-r--r--include/serd/serd.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/serd/serd.h b/include/serd/serd.h
index 9db354ac..6274957f 100644
--- a/include/serd/serd.h
+++ b/include/serd/serd.h
@@ -43,7 +43,7 @@
# define SERD_CONST_FUNC
#endif
-#ifdef __clang__
+#if defined(__clang__) && __clang_major__ >= 7
# define SERD_NONNULL _Nonnull
# define SERD_NULLABLE _Nullable
# define SERD_ALLOCATED _Null_unspecified