summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/sys/cdefs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h
index 2a57705..77f1fd4 100644
--- a/sys/sys/cdefs.h
+++ b/sys/sys/cdefs.h
@@ -241,6 +241,8 @@
* require it.
*/
#define __offsetof(type, field) ((size_t)(&((type *)0)->field))
+#define __rangeof(type, start, end) \
+ (__offsetof(type, end) - __offsetof(type, start))
/*
* Compiler-dependent macros to declare that functions take printf-like
OpenPOWER on IntegriCloud