summaryrefslogtreecommitdiffstats
path: root/sys/sys
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2017-04-13 18:28:40 +0000
committerpfg <pfg@FreeBSD.org>2017-04-13 18:28:40 +0000
commita2cbaa55482d292b1eb555625ec5b51280f32f0b (patch)
treebf933204d7549f088b70dbfa441f331a56e428c5 /sys/sys
parentacd4dfcbeca3ade2fa921b121725c3ab2e71fe4b (diff)
downloadFreeBSD-src-a2cbaa55482d292b1eb555625ec5b51280f32f0b.zip
FreeBSD-src-a2cbaa55482d292b1eb555625ec5b51280f32f0b.tar.gz
Temporarily revert r315602.
Bring back the definition for the GCC __nonnull() attribute. Old versions of GCC, including the version installed the latest 11-stable snapshot with pkg(8), still carry the old attributes. The issue is easily fixed by rebuilding GCC but there is no need to cause havoc in our user base. The definition by itself is harmless but it should be removed again in the near future.
Diffstat (limited to 'sys/sys')
-rw-r--r--sys/sys/cdefs.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h
index 535c721..8027d33 100644
--- a/sys/sys/cdefs.h
+++ b/sys/sys/cdefs.h
@@ -376,6 +376,14 @@
#define __noinline
#endif
+#if __GNUC_PREREQ__(3, 3)
+#define __nonnull(x) __attribute__((__nonnull__(x)))
+#define __nonnull_all __attribute__((__nonnull__))
+#else
+#define __nonnull(x)
+#define __nonnull_all
+#endif
+
#if __GNUC_PREREQ__(3, 4)
#define __fastcall __attribute__((__fastcall__))
#define __result_use_check __attribute__((__warn_unused_result__))
OpenPOWER on IntegriCloud