[klibc] [PATCH] Fix missing include in sys/mman.h

Barret Rhoden brho at google.com
Thu Mar 14 14:30:38 PDT 2019

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

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 at google.com>

That patch is in linux-next:

$ git describe 746c9398f5ac2b3f5730da4ed09e99ef4bb50b4a

 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 56f0b65cb025..3fd626e7402a 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)

More information about the klibc mailing list