summaryrefslogtreecommitdiffstats
path: root/lib/libc/sys/posix_madvise.c
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2010-05-18 22:24:54 +0000
committertedu <tedu@openbsd.org>2010-05-18 22:24:54 +0000
commit243f393511fee0e3dea053d89336d8b8f85b60ee (patch)
treef0de8eb1b6b3091104481b8be30b613f807883d6 /lib/libc/sys/posix_madvise.c
parentAdd as yet untested support for the 82576 quad copper ET2 (diff)
downloadwireguard-openbsd-243f393511fee0e3dea053d89336d8b8f85b60ee.tar.xz
wireguard-openbsd-243f393511fee0e3dea053d89336d8b8f85b60ee.zip
add posix_madvise, posix_memalign, strndup, and strnlen. mostly from
brad and millert, with hints from guenther, jmc, and otto I think. ok previous.
Diffstat (limited to 'lib/libc/sys/posix_madvise.c')
-rw-r--r--lib/libc/sys/posix_madvise.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/libc/sys/posix_madvise.c b/lib/libc/sys/posix_madvise.c
new file mode 100644
index 00000000000..4952c5cc77a
--- /dev/null
+++ b/lib/libc/sys/posix_madvise.c
@@ -0,0 +1,11 @@
+/* $OpenBSD: posix_madvise.c,v 1.1 2010/05/18 22:24:55 tedu Exp $ */
+/*
+ * Ted Unangst wrote this file and placed it into the public domain.
+ */
+#include <sys/mman.h>
+
+int
+posix_madvise(void *addr, size_t len, int behav)
+{
+ return (_thread_sys_madvise(addr, len, behav));
+}