summaryrefslogtreecommitdiff
path: root/lib/libc/sys/posix_madvise.c
blob: 993ff4cc078e368a53e25236108cffaddd528791 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/*	$OpenBSD: posix_madvise.c,v 1.4 2015/09/11 13:26:20 guenther Exp $ */
/*
 * Ted Unangst wrote this file and placed it into the public domain.
 */
#include <sys/mman.h>
#include <errno.h>

int
posix_madvise(void *addr, size_t len, int behav)
{
	return (madvise(addr, len, behav) ? errno : 0);
}