diff options
-rw-r--r-- | src/mman/posix_madvise.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mman/posix_madvise.c b/src/mman/posix_madvise.c index 4727ad75..b76f1a75 100644 --- a/src/mman/posix_madvise.c +++ b/src/mman/posix_madvise.c @@ -1,6 +1,8 @@ +#define _GNU_SOURCE #include <sys/mman.h> int posix_madvise(void *addr, size_t len, int advice) { - return 0; + if (advice == MADV_DONTNEED) return 0; + return -__syscall(SYS_madvise, addr, len, advice); } |