kumquat-buildroot/package/uclibc/0002-include-sys-mman.h-remove-madvise-posix_madvise-prot.patch
Waldemar Brodkorb 41e5c94c56 uclibc: add various upstream patches
Fix some static linking issues for Xtensa/Blackfin.
Optimize the size for non-threaded static binaries and
fix static C/C++ applications when running on the target.
Fix noMMU madvise declarations.

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-12-10 15:59:28 +01:00

37 lines
1.3 KiB
Diff

From 25a60624713990c637f125e094e968ff4655307c Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 7 Dec 2016 23:20:18 +0100
Subject: [PATCH] include/sys/mman.h: remove madvise/posix_madvise
prototypes on noMMU
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
---
include/sys/mman.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/sys/mman.h b/include/sys/mman.h
index 71d553a..fc8fce5 100644
--- a/include/sys/mman.h
+++ b/include/sys/mman.h
@@ -99,6 +99,7 @@ static __inline__ int msync (void *__addr, size_t __len, int __flags) { return 0
#endif
+#ifdef __ARCH_USE_MMU__
#if defined __USE_BSD && (defined __UCLIBC_LINUX_SPECIFIC__ || defined __UCLIBC_HAS_THREADS_NATIVE__)
/* Advise the system about particular usage patterns the program follows
for the region starting at ADDR and extending LEN bytes. */
@@ -108,6 +109,8 @@ extern int madvise (void *__addr, size_t __len, int __advice) __THROW;
/* This is the POSIX name for this function. */
extern int posix_madvise (void *__addr, size_t __len, int __advice) __THROW;
#endif
+#endif /* __ARCH_USE_MMU__ */
+
#if defined __UCLIBC_HAS_REALTIME__
# ifdef __ARCH_USE_MMU__
--
2.1.4