summaryrefslogtreecommitdiff
path: root/pkg/openbsd/include
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/openbsd/include')
-rw-r--r--pkg/openbsd/include/err.h3
-rw-r--r--pkg/openbsd/include/grp.h2
-rw-r--r--pkg/openbsd/include/machine/endian.h1
-rw-r--r--pkg/openbsd/include/pwd.h2
-rw-r--r--pkg/openbsd/include/stdlib.h10
-rw-r--r--pkg/openbsd/include/string.h4
-rw-r--r--pkg/openbsd/include/sys/cdefs.h5
-rw-r--r--pkg/openbsd/include/sys/param.h3
-rw-r--r--pkg/openbsd/include/sys/time.h5
-rw-r--r--pkg/openbsd/include/unistd.h3
10 files changed, 38 insertions, 0 deletions
diff --git a/pkg/openbsd/include/err.h b/pkg/openbsd/include/err.h
new file mode 100644
index 00000000..c537811b
--- /dev/null
+++ b/pkg/openbsd/include/err.h
@@ -0,0 +1,3 @@
+#include_next <err.h>
+void warnc(int, const char *, ...) __attribute__((__format__ (printf, 2, 3)));
+void vwarnc(int, const char *, va_list) __attribute__((__format__ (printf, 2, 0)));
diff --git a/pkg/openbsd/include/grp.h b/pkg/openbsd/include/grp.h
new file mode 100644
index 00000000..49f4dfd4
--- /dev/null
+++ b/pkg/openbsd/include/grp.h
@@ -0,0 +1,2 @@
+#include_next <grp.h>
+#define setgroupent(n) setgrent()
diff --git a/pkg/openbsd/include/machine/endian.h b/pkg/openbsd/include/machine/endian.h
new file mode 100644
index 00000000..2dc4d830
--- /dev/null
+++ b/pkg/openbsd/include/machine/endian.h
@@ -0,0 +1 @@
+#include <endian.h>
diff --git a/pkg/openbsd/include/pwd.h b/pkg/openbsd/include/pwd.h
new file mode 100644
index 00000000..e859a8d1
--- /dev/null
+++ b/pkg/openbsd/include/pwd.h
@@ -0,0 +1,2 @@
+#include_next <pwd.h>
+#define setpassent(n) setpwent()
diff --git a/pkg/openbsd/include/stdlib.h b/pkg/openbsd/include/stdlib.h
new file mode 100644
index 00000000..0e1aa252
--- /dev/null
+++ b/pkg/openbsd/include/stdlib.h
@@ -0,0 +1,10 @@
+#include_next <stdlib.h>
+#include <stdint.h>
+void *reallocarray(void *, size_t, size_t);
+long long strtonum(const char *, long long, long long, const char **);
+uint32_t arc4random(void);
+uint32_t arc4random_uniform(uint32_t);
+void arc4random_buf(void *, size_t);
+void setprogname(const char *);
+const char *getprogname(void);
+extern char *__progname;
diff --git a/pkg/openbsd/include/string.h b/pkg/openbsd/include/string.h
new file mode 100644
index 00000000..17c8ad81
--- /dev/null
+++ b/pkg/openbsd/include/string.h
@@ -0,0 +1,4 @@
+#include_next <string.h>
+void explicit_bzero(void *, size_t);
+void strmode(int, char *);
+int timingsafe_memcmp(const void *, const void *, size_t);
diff --git a/pkg/openbsd/include/sys/cdefs.h b/pkg/openbsd/include/sys/cdefs.h
new file mode 100644
index 00000000..70258b8c
--- /dev/null
+++ b/pkg/openbsd/include/sys/cdefs.h
@@ -0,0 +1,5 @@
+/* only needed for C++ */
+#define __BEGIN_DECLS
+#define __END_DECLS
+
+#define __dead __attribute__((__noreturn__))
diff --git a/pkg/openbsd/include/sys/param.h b/pkg/openbsd/include/sys/param.h
new file mode 100644
index 00000000..3167713c
--- /dev/null
+++ b/pkg/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/pkg/openbsd/include/sys/time.h b/pkg/openbsd/include/sys/time.h
new file mode 100644
index 00000000..98d5d3a7
--- /dev/null
+++ b/pkg/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))
diff --git a/pkg/openbsd/include/unistd.h b/pkg/openbsd/include/unistd.h
new file mode 100644
index 00000000..17e14240
--- /dev/null
+++ b/pkg/openbsd/include/unistd.h
@@ -0,0 +1,3 @@
+#include_next <unistd.h>
+#define pledge(request, paths) 0 /* linux doesn't have pledge */
+int getentropy(void *, size_t);