From: Waldemar Brodkorb <wbx@openadk.org>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] uclibc: add madvise macro patch from upstream
Date: Sun, 27 Nov 2016 16:37:45 +0100 [thread overview]
Message-ID: <20161127153745.GA27642@waldemar-brodkorb.de> (raw)
Fixes:
http://autobuild.buildroot.net/results/6f296139633df24031b20d8bd5191e0f5928ec68
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
---
upstream patch is not yet pushed.
---
...ne-madvise-related-macros-for-noMMU-targe.patch | 66 ++++++++++++++++++++++
1 file changed, 66 insertions(+)
create mode 100644 package/uclibc/0002-do-not-define-madvise-related-macros-for-noMMU-targe.patch
diff --git a/package/uclibc/0002-do-not-define-madvise-related-macros-for-noMMU-targe.patch b/package/uclibc/0002-do-not-define-madvise-related-macros-for-noMMU-targe.patch
new file mode 100644
index 0000000..31e763a
--- /dev/null
+++ b/package/uclibc/0002-do-not-define-madvise-related-macros-for-noMMU-targe.patch
@@ -0,0 +1,66 @@
+From 2ca4e8dcbd35e5c6da41a195550d741ccb2f7978 Mon Sep 17 00:00:00 2001
+From: Waldemar Brodkorb <wbx@uclibc-ng.org>
+Date: Sat, 26 Nov 2016 19:47:41 +0100
+Subject: [PATCH] do not define madvise related macros for noMMU targets
+
+Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
+---
+ libc/sysdeps/linux/common/bits/mman-common.h | 41 +++++++++++++++-------------
+ 1 file changed, 22 insertions(+), 19 deletions(-)
+
+diff --git a/libc/sysdeps/linux/common/bits/mman-common.h b/libc/sysdeps/linux/common/bits/mman-common.h
+index 6cde5da..5b20da4 100644
+--- a/libc/sysdeps/linux/common/bits/mman-common.h
++++ b/libc/sysdeps/linux/common/bits/mman-common.h
+@@ -83,26 +83,29 @@
+ # define MREMAP_FIXED 2
+ #endif
+
++/* only define for MMU targets, no-MMU does not support madvise. */
++#ifdef __ARCH_USE_MMU__
+ /* Advice to `madvise'. */
+-#ifdef __USE_BSD
+-# define MADV_NORMAL 0 /* No further special treatment. */
+-# define MADV_RANDOM 1 /* Expect random page references. */
+-# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
+-# define MADV_WILLNEED 3 /* Will need these pages. */
+-# define MADV_DONTNEED 4 /* Don't need these pages. */
+-# define MADV_REMOVE 9 /* Remove these pages and resources. */
+-# define MADV_DONTFORK 10 /* Do not inherit across fork. */
+-# define MADV_DOFORK 11 /* Do inherit across fork. */
+-# define MADV_MERGEABLE 12 /* KSM may merge identical pages. */
+-# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */
+-# define MADV_HWPOISON 100 /* Poison a page for testing. */
+-#endif
++# ifdef __USE_BSD
++# define MADV_NORMAL 0 /* No further special treatment. */
++# define MADV_RANDOM 1 /* Expect random page references. */
++# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
++# define MADV_WILLNEED 3 /* Will need these pages. */
++# define MADV_DONTNEED 4 /* Don't need these pages. */
++# define MADV_REMOVE 9 /* Remove these pages and resources. */
++# define MADV_DONTFORK 10 /* Do not inherit across fork. */
++# define MADV_DOFORK 11 /* Do inherit across fork. */
++# define MADV_MERGEABLE 12 /* KSM may merge identical pages. */
++# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */
++# define MADV_HWPOISON 100 /* Poison a page for testing. */
++# endif
+
+ /* The POSIX people had to invent similar names for the same things. */
+-#ifdef __USE_XOPEN2K
+-# define POSIX_MADV_NORMAL 0 /* No further special treatment. */
+-# define POSIX_MADV_RANDOM 1 /* Expect random page references. */
+-# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */
+-# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */
+-# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */
++# ifdef __USE_XOPEN2K
++# define POSIX_MADV_NORMAL 0 /* No further special treatment. */
++# define POSIX_MADV_RANDOM 1 /* Expect random page references. */
++# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */
++# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */
++# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */
++# endif
+ #endif
+--
+2.1.4
+
--
2.1.4
next reply other threads:[~2016-11-27 15:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-27 15:37 Waldemar Brodkorb [this message]
2016-11-27 21:23 ` [Buildroot] [PATCH] uclibc: add madvise macro patch from upstream Thomas Petazzoni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161127153745.GA27642@waldemar-brodkorb.de \
--to=wbx@openadk.org \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox