diff options
| -rw-r--r-- | meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-btrfs-tools-include-linux-const.h-to-fix-build-with-.patch | 42 | ||||
| -rw-r--r-- | meta/recipes-devtools/btrfs-tools/btrfs-tools_5.12.1.bb | 1 |
2 files changed, 43 insertions, 0 deletions
diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-btrfs-tools-include-linux-const.h-to-fix-build-with-.patch b/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-btrfs-tools-include-linux-const.h-to-fix-build-with-.patch new file mode 100644 index 0000000000..d7188881da --- /dev/null +++ b/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-btrfs-tools-include-linux-const.h-to-fix-build-with-.patch | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | From 3d19b0fb882c5e195362a9f0909c474e60070ca0 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
| 3 | Date: Fri, 18 Jun 2021 11:10:36 -0400 | ||
| 4 | Subject: [PATCH] btrfs-progs: include linux/const.h to fix build with 5.12+ | ||
| 5 | headers | ||
| 6 | |||
| 7 | btrfs-tools compile fails with mips, musl and 5.12+ headers. | ||
| 8 | |||
| 9 | The definition of __ALIGN_KERNEL has moved in 5.12+ kernels, so we | ||
| 10 | add an explicit include of const.h to pickup the macro: | ||
| 11 | |||
| 12 | | make: *** [Makefile:595: mkfs.btrfs] Error 1 | ||
| 13 | | make: *** Waiting for unfinished jobs.... | ||
| 14 | | libbtrfs.a(volumes.o): in function `dev_extent_search_start': | ||
| 15 | | /usr/src/debug/btrfs-tools/5.12.1-r0/git/kernel-shared/volumes.c:464: undefined reference to `__ALIGN_KERNEL' | ||
| 16 | | collect2: error: ld returned 1 exit status | ||
| 17 | |||
| 18 | This is safe for older kernel's as well, since the header still | ||
| 19 | exists, and is valid to include. | ||
| 20 | |||
| 21 | Upstream-status: OE Specific [mips64 + musl + libc-headers] | ||
| 22 | |||
| 23 | Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
| 24 | --- | ||
| 25 | kerncompat.h | 1 + | ||
| 26 | 1 file changed, 1 insertion(+) | ||
| 27 | |||
| 28 | diff --git a/kerncompat.h b/kerncompat.h | ||
| 29 | index df167fe6..254235bd 100644 | ||
| 30 | --- a/kerncompat.h | ||
| 31 | +++ b/kerncompat.h | ||
| 32 | @@ -30,6 +30,7 @@ | ||
| 33 | #include <linux/types.h> | ||
| 34 | #include <linux/kernel.h> | ||
| 35 | #include <stdint.h> | ||
| 36 | +#include <linux/const.h> | ||
| 37 | |||
| 38 | #include <features.h> | ||
| 39 | |||
| 40 | -- | ||
| 41 | 2.25.1 | ||
| 42 | |||
diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.12.1.bb b/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.12.1.bb index 3fc959bf8e..d0c9cf2a99 100644 --- a/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.12.1.bb +++ b/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.12.1.bb | |||
| @@ -18,6 +18,7 @@ DEPENDS_append_class-target = " udev" | |||
| 18 | 18 | ||
| 19 | SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git \ | 19 | SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git \ |
| 20 | file://0001-Add-a-possibility-to-specify-where-python-modules-ar.patch \ | 20 | file://0001-Add-a-possibility-to-specify-where-python-modules-ar.patch \ |
| 21 | file://0001-btrfs-tools-include-linux-const.h-to-fix-build-with-.patch \ | ||
| 21 | " | 22 | " |
| 22 | SRCREV = "96d77fcefdd3b9fd297b5aabbce6dc43e2315ee2" | 23 | SRCREV = "96d77fcefdd3b9fd297b5aabbce6dc43e2315ee2" |
| 23 | S = "${WORKDIR}/git" | 24 | S = "${WORKDIR}/git" |
