Provide a nicer error message to people with old compiler versions.
diff --git a/sdk/include/cdefs.h b/sdk/include/cdefs.h
index d7e87e6..1c6eca3 100644
--- a/sdk/include/cdefs.h
+++ b/sdk/include/cdefs.h
@@ -62,7 +62,13 @@
 #define __alloc_size(x) __attribute__((alloc_size(x)))
 #define __alloc_align(x) __attribute__((alloc_align(x)))
 #define __cheri_callback __attribute__((cheri_ccallback))
-#define __cheriot_minimum_stack(x) __attribute__((cheriot_minimum_stack(x)))
+#if __has_attribute(cheriot_minimum_stack)
+#	define __cheriot_minimum_stack(x) __attribute__((cheriot_minimum_stack(x)))
+#else
+#	warning                                                                    \
+	  "cheriot_minimum_stack attribute not supported, please update your compiler"
+#	define __cheriot_minimum_stack(x)
+#endif
 // When running clang-tidy, we use the same compile flags for everything and so
 // will get errors about things being defined in the wrong compartment, so
 // define away the compartment name and pretend everything is local for now.