]> code.ossystems Code Review - openembedded-core.git/commit
btrfs-tools: include linux/const.h to fix build with 5.12+ headers
authorBruce Ashfield <bruce.ashfield@gmail.com>
Fri, 18 Jun 2021 19:43:45 +0000 (15:43 -0400)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 21 Jun 2021 10:09:34 +0000 (11:09 +0100)
commite81b531939214a1a34f8841a5f0aaf16fbbe4d08
treefb8faa10902b830a071211c540f0f0b09e615f35
parentbf3892cef3381f6bd277228cdcc5a00fcfe3f3af
btrfs-tools: include linux/const.h to fix build with 5.12+ headers

btrfs-tools compile fails with mips, musl and 5.12+ headers.

The definition of __ALIGN_KERNEL has moved in 5.12+ kernels, so we
add an explicit include of const.h to pickup the macro:

  | make: *** [Makefile:595: mkfs.btrfs] Error 1
  | make: *** Waiting for unfinished jobs....
  | libbtrfs.a(volumes.o): in function `dev_extent_search_start':
  | /usr/src/debug/btrfs-tools/5.12.1-r0/git/kernel-shared/volumes.c:464: undefined reference to `__ALIGN_KERNEL'
  | collect2: error: ld returned 1 exit status

This is safe for older kernels as well, since the header still
exists, and is valid to include.

(From OE-Core rev: 78eb20ed31e27865c990f96803215139bc99060f)

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-btrfs-tools-include-linux-const.h-to-fix-build-with-.patch [new file with mode: 0644]
meta/recipes-devtools/btrfs-tools/btrfs-tools_5.12.1.bb