Skip to content
Commit e81b5319 authored by Bruce Ashfield's avatar Bruce Ashfield Committed by Richard Purdie
Browse files

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: default avatarBruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent bf3892ce
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment