fix dup3 ignoring all flags but O_CLOEXEC on archs with SYS_dup2 syscall
[musl] / src / mman / madvise.c
index f03647c..e0c7c0e 100644 (file)
@@ -1,10 +1,9 @@
 #include <sys/mman.h>
 #include "syscall.h"
-#include "libc.h"
 
 int __madvise(void *addr, size_t len, int advice)
 {
-       return syscall3(__NR_madvise, (long)addr, len, advice);
+       return syscall(SYS_madvise, addr, len, advice);
 }
 
 weak_alias(__madvise, madvise);