[PATCH] Fix msync() redefinition for noMMU build
Steven J. Magnani
steve at digidescorp.com
Sun Oct 3 15:26:47 UTC 2010
An architecture that _may_ have a MMU (and thus implements
the msync syscall), but for which the kernel and uClibc are built as noMMU,
results in a compile error:
libc/sysdeps/linux/common/msync.c:43: error: redefinition of 'msync'
./include/sys/mman.h:99: error: previous definition of 'msync' was here
Signed-off-by: Steven J. Magnani <steve at digidescorp.com>
---
diff -uprN a/libc/sysdeps/linux/common/msync.c b/libc/sysdeps/linux/common/msync.c
--- a/libc/sysdeps/linux/common/msync.c 2010-09-20 08:03:17.000000000 -0500
+++ b/libc/sysdeps/linux/common/msync.c 2010-09-21 20:59:04.000000000 -0500
@@ -11,7 +11,7 @@
#include <unistd.h>
#include <sys/mman.h>
-#ifdef __NR_msync
+#if defined __NR_msync && defined __ARCH_USE_MMU__
#ifdef __UCLIBC_HAS_THREADS_NATIVE__
#include <sysdep-cancel.h>
More information about the uClibc
mailing list