summaryrefslogtreecommitdiff
path: root/os/port/lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'os/port/lib.h')
-rw-r--r--os/port/lib.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/os/port/lib.h b/os/port/lib.h
index d6af4fa5..c9414b5a 100644
--- a/os/port/lib.h
+++ b/os/port/lib.h
@@ -2,6 +2,9 @@
/*
* functions (possibly) linked in, complete, from libc.
*/
+#define nelem(n) (sizeof(n)/sizeof(n[0]))
+#define offsetof(s, m) (ulong)(&(((s*)0)->m))
+#define assert(x) if(x){}else _assert("x")
/*
* mem routines