summaryrefslogtreecommitdiff
path: root/core/openbsd/include/sys
diff options
context:
space:
mode:
Diffstat (limited to 'core/openbsd/include/sys')
-rw-r--r--core/openbsd/include/sys/cdefs.h3
-rw-r--r--core/openbsd/include/sys/param.h3
-rw-r--r--core/openbsd/include/sys/time.h5
3 files changed, 11 insertions, 0 deletions
diff --git a/core/openbsd/include/sys/cdefs.h b/core/openbsd/include/sys/cdefs.h
new file mode 100644
index 00000000..f1e05946
--- /dev/null
+++ b/core/openbsd/include/sys/cdefs.h
@@ -0,0 +1,3 @@
+/* only needed for C++ */
+#define __BEGIN_DECLS
+#define __END_DECLS
diff --git a/core/openbsd/include/sys/param.h b/core/openbsd/include/sys/param.h
new file mode 100644
index 00000000..3167713c
--- /dev/null
+++ b/core/openbsd/include/sys/param.h
@@ -0,0 +1,3 @@
+#include_next <sys/param.h>
+#define ALIGNBYTES (sizeof(uintptr_t) - 1)
+#define ALIGN(p) (((uintptr_t)(p) + ALIGNBYTES) &~ ALIGNBYTES)
diff --git a/core/openbsd/include/sys/time.h b/core/openbsd/include/sys/time.h
new file mode 100644
index 00000000..98d5d3a7
--- /dev/null
+++ b/core/openbsd/include/sys/time.h
@@ -0,0 +1,5 @@
+#include_next <sys/time.h>
+#define timespeccmp(tsp, usp, cmp) \
+ (((tsp)->tv_sec == (usp)->tv_sec) ? \
+ ((tsp)->tv_nsec cmp (usp)->tv_nsec) : \
+ ((tsp)->tv_sec cmp (usp)->tv_sec))