blob: a9156ade4b79cc4d390721c4e4404ea1fd50ab49 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
https://cgit.openembedded.org/openembedded-core/plain/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-btrfs-tools-include-linux-const.h-to-fix-build-with-.patch?id=fd8989db25c674ca65389a2d41bf5b447e8794be
From: Bruce Ashfield <bruce.ashfield@gmail.com>
Date: Fri, 18 Jun 2021 11:10:36 -0400
Subject: [PATCH] btrfs-progs: 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 kernel's as well, since the header still
exists, and is valid to include.
Upstream-status: OE Specific [mips64 + musl + libc-headers]
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
--- a/kerncompat.h
+++ b/kerncompat.h
@@ -30,6 +30,7 @@
#include <linux/types.h>
#include <linux/kernel.h>
#include <stdint.h>
+#include <linux/const.h>
#include <features.h>
|