aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/include/sys/cdefs.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/include/sys/cdefs.h b/sys/include/sys/cdefs.h
index e5d5531..92cdec3 100644
--- a/sys/include/sys/cdefs.h
+++ b/sys/include/sys/cdefs.h
@@ -48,6 +48,10 @@
#define __END_DECLS
#endif
+#ifndef offsetof
+#define offsetof(st, m) ((size_t)&(((st *)0)->m))
+#endif /* offsetof */
+
#if defined(_KERNEL)
/*
* Align data on a cache line boundary. This is