aboutsummaryrefslogtreecommitdiffstats
path: root/meta-filesystems/recipes-utils/xfsprogs/files
diff options
context:
space:
mode:
Diffstat (limited to 'meta-filesystems/recipes-utils/xfsprogs/files')
-rw-r--r--meta-filesystems/recipes-utils/xfsprogs/files/0001-Check-for-MAP_SYNC-in-sys-mman.h.patch52
-rw-r--r--meta-filesystems/recipes-utils/xfsprogs/files/0002-include-include-xfs-linux.h-after-sys-mman.h.patch33
2 files changed, 85 insertions, 0 deletions
diff --git a/meta-filesystems/recipes-utils/xfsprogs/files/0001-Check-for-MAP_SYNC-in-sys-mman.h.patch b/meta-filesystems/recipes-utils/xfsprogs/files/0001-Check-for-MAP_SYNC-in-sys-mman.h.patch
new file mode 100644
index 0000000000..75b227ac19
--- /dev/null
+++ b/meta-filesystems/recipes-utils/xfsprogs/files/0001-Check-for-MAP_SYNC-in-sys-mman.h.patch
@@ -0,0 +1,52 @@
+From f41ef1f06d428c81fcdef73d896dfc7ceda1809c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 23 Aug 2018 04:59:39 +0000
+Subject: [PATCH] Check for MAP_SYNC in sys/mman.h
+
+Not all arches have wired MAP_SYNC e.g. mips
+which have conflicts with definition, so checking
+a generic file is going to mis-configure xfsprogs
+for such arches.
+
+libc now has added the relevant macros to
+sys/mman.h, and returns the right values for arches
+where its implemented and nothing for others
+unlike asm-generic/mman.h which only checks
+for kernel headers and ignored arches
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ include/linux.h | 3 +--
+ m4/package_libcdev.m4 | 3 +--
+ 2 files changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/include/linux.h b/include/linux.h
+index 1998941..7e5c9ab 100644
+--- a/include/linux.h
++++ b/include/linux.h
+@@ -331,8 +331,7 @@ fsmap_advance(
+ #define MAP_SYNC 0
+ #define MAP_SHARED_VALIDATE 0
+ #else
+-#include <asm-generic/mman.h>
+-#include <asm-generic/mman-common.h>
++#include <sys/mman.h>
+ #endif /* HAVE_MAP_SYNC */
+
+ #endif /* __XFS_LINUX_H__ */
+diff --git a/m4/package_libcdev.m4 b/m4/package_libcdev.m4
+index 0a6b514..2b47d2f 100644
+--- a/m4/package_libcdev.m4
++++ b/m4/package_libcdev.m4
+@@ -335,8 +335,7 @@ AC_DEFUN([AC_HAVE_STATFS_FLAGS],
+ AC_DEFUN([AC_HAVE_MAP_SYNC],
+ [ AC_MSG_CHECKING([for MAP_SYNC])
+ AC_TRY_COMPILE([
+-#include <asm-generic/mman.h>
+-#include <asm-generic/mman-common.h>
++#include <sys/mman.h>
+ ], [
+ int flags = MAP_SYNC | MAP_SHARED_VALIDATE;
+ ], have_map_sync=yes
diff --git a/meta-filesystems/recipes-utils/xfsprogs/files/0002-include-include-xfs-linux.h-after-sys-mman.h.patch b/meta-filesystems/recipes-utils/xfsprogs/files/0002-include-include-xfs-linux.h-after-sys-mman.h.patch
new file mode 100644
index 0000000000..89447fd92e
--- /dev/null
+++ b/meta-filesystems/recipes-utils/xfsprogs/files/0002-include-include-xfs-linux.h-after-sys-mman.h.patch
@@ -0,0 +1,33 @@
+From 18298d7c028cd5fbd2c68fa428dc2384344aeb91 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 23 Aug 2018 05:33:57 +0000
+Subject: [PATCH] include include/xfs/linux.h after <sys/mman.h>
+
+This helps compiling with musl which goes ahead and undefines MAP_SYNC
+for mips and other architectures where its not wired in kernel
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ io/mmap.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/io/mmap.c b/io/mmap.c
+index 106be49..34fadf4 100644
+--- a/io/mmap.c
++++ b/io/mmap.c
+@@ -16,10 +16,11 @@
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+-#include "command.h"
+-#include "input.h"
+ #include <sys/mman.h>
+ #include <signal.h>
++
++#include "command.h"
++#include "input.h"
+ #include "init.h"
+ #include "io.h"
+