diff mbox series

[oe,warrior-next,06/10] klibc: Fix build with 5.2+ kernel headers

Message ID 6748bb66d50cab6acb56a0c4596d9d3c7650e4fb.1569801183.git.akuster808@gmail.com
State New
Headers show
Series None | expand

Commit Message

Armin Kuster Sept. 29, 2019, 11:55 p.m. UTC
From: Khem Raj <raj.khem@gmail.com>


Signed-off-by: Khem Raj <raj.khem@gmail.com>

(cherry picked from commit ab3072ee4cf555eb5eb8b6200fd0ffb3eab3f947)
Signed-off-by: Armin Kuster <akuster808@gmail.com>

---
 .../0001-Fix-missing-include-in-sys-mman.h.patch   | 36 ++++++++++++++++++++++
 meta-initramfs/recipes-devtools/klibc/klibc.inc    |  1 +
 2 files changed, 37 insertions(+)
 create mode 100644 meta-initramfs/recipes-devtools/klibc/files/0001-Fix-missing-include-in-sys-mman.h.patch

-- 
2.7.4

-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

Comments

Adrian Bunk Sept. 30, 2019, 8:04 a.m. UTC | #1
This and the other 3 "fix build with 5.2 headers" patches are all for 
userspace code that uses the UAPI kernel headers that won't change in 
warrior, so these 4 commits are not needed.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
diff mbox series

Patch

diff --git a/meta-initramfs/recipes-devtools/klibc/files/0001-Fix-missing-include-in-sys-mman.h.patch b/meta-initramfs/recipes-devtools/klibc/files/0001-Fix-missing-include-in-sys-mman.h.patch
new file mode 100644
index 0000000..4bedef8
--- /dev/null
+++ b/meta-initramfs/recipes-devtools/klibc/files/0001-Fix-missing-include-in-sys-mman.h.patch
@@ -0,0 +1,36 @@ 
+From 36360b16833400de7818151be5588b16ac4fd5bc Mon Sep 17 00:00:00 2001
+From: Barret Rhoden <brho@google.com>
+Date: Thu, 14 Mar 2019 17:30:38 -0400
+Subject: [PATCH] Fix missing include in sys/mman.h
+
+Linux commit 746c9398f5ac ("arch: move common mmap flags to
+linux/mman.h") moved a few mmap flags, particularly MAP_PRIVATE, from
+asm/mman.h to linux/mman.h.  This broke klibc's build, which uses
+MAP_PRIVATE.
+
+linux/mman.h includes asm/mman.h, so this commit merely includes
+linux/mman.h instead of asm/mman.h.
+
+Signed-off-by: Barret Rhoden <brho@google.com>
+Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
+---
+Upstream-Status: Backport [https://git.kernel.org/pub/scm/libs/klibc/klibc.git/commit/?id=d4853d030639cf3542ae39129c18b654d8d4f020]
+ usr/include/sys/mman.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/usr/include/sys/mman.h b/usr/include/sys/mman.h
+index 56f0b65c..3fd626e7 100644
+--- a/usr/include/sys/mman.h
++++ b/usr/include/sys/mman.h
+@@ -7,7 +7,7 @@
+ 
+ #include <klibc/extern.h>
+ #include <sys/types.h>
+-#include <asm/mman.h>
++#include <linux/mman.h>
+ 
+ #define MAP_FAILED ((void *)-1)
+ 
+-- 
+2.23.0
+
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc.inc b/meta-initramfs/recipes-devtools/klibc/klibc.inc
index 86aae33..26689f8 100644
--- a/meta-initramfs/recipes-devtools/klibc/klibc.inc
+++ b/meta-initramfs/recipes-devtools/klibc/klibc.inc
@@ -23,6 +23,7 @@  SRC_URI = "git://git.kernel.org/pub/scm/libs/klibc/klibc.git \
            file://0001-klibc-add-getrandom-syscall.patch \
            file://0001-klibc-Kbuild-Accept-EXTRA_KLIBCAFLAGS.patch \
            file://0001-Define-ulocked_-fgets-fread-fwrite-aliases.patch \
+           file://0001-Fix-missing-include-in-sys-mman.h.patch \
            "
 
 ARMPATCHES ?= ""