aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrooks Davis <brooks@FreeBSD.org>2025-11-27 14:54:56 +0000
committerBrooks Davis <brooks@FreeBSD.org>2025-11-27 14:54:56 +0000
commit85ab981a8e4e1a7a078dbf553cb20cb2e58aeff9 (patch)
tree2fa193837d9dd127389e8f7e300ed0d0fbb2d36c
parent96e05e2d1dfc69f67d3099440561530501cc09b5 (diff)
-rw-r--r--sys/sys/_types.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/sys/_types.h b/sys/sys/_types.h
index 4f5b8e5db273..e4d14da3c11e 100644
--- a/sys/sys/_types.h
+++ b/sys/sys/_types.h
@@ -155,6 +155,17 @@ typedef int __cpulevel_t; /* level parameter for cpuset. */
typedef int __cpusetid_t; /* cpuset identifier. */
typedef __int64_t __daddr_t; /* bwrite(3), FIOBMAP2, etc */
+#if !__has_feature(capabilities)
+/*
+ * On non-CHERI systems, define __(u)intcap_t to __(u)intptr_t so that
+ * hybrid-C code which needs to be explicitly aware of capabilities can
+ * use it. These types may be present in some third-party code and
+ * should not generally be used in FreeBSD code.
+ */
+typedef __intptr_t __intcap_t;
+typedef __uintptr_t __uintcap_t;
+#endif
+
/*
* Unusual type definitions.
*/