summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-core/util-linux/util-linux.inc1
-rw-r--r--meta/recipes-core/util-linux/util-linux/0001-configure.ac-Improve-check-for-magic.patch40
2 files changed, 41 insertions, 0 deletions
diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
index 416550a6b2..3868b1c41d 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -36,6 +36,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/util-linux/v${MAJOR_VERSION}/util-lin
36 file://display_testname_for_subtest.patch \ 36 file://display_testname_for_subtest.patch \
37 file://avoid_parallel_tests.patch \ 37 file://avoid_parallel_tests.patch \
38 file://0001-check-for-sys-pidfd.h.patch \ 38 file://0001-check-for-sys-pidfd.h.patch \
39 file://0001-configure.ac-Improve-check-for-magic.patch \
39 " 40 "
40 41
41SRC_URI[sha256sum] = "60492a19b44e6cf9a3ddff68325b333b8b52b6c59ce3ebd6a0ecaa4c5117e84f" 42SRC_URI[sha256sum] = "60492a19b44e6cf9a3ddff68325b333b8b52b6c59ce3ebd6a0ecaa4c5117e84f"
diff --git a/meta/recipes-core/util-linux/util-linux/0001-configure.ac-Improve-check-for-magic.patch b/meta/recipes-core/util-linux/util-linux/0001-configure.ac-Improve-check-for-magic.patch
new file mode 100644
index 0000000000..00611fe578
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux/0001-configure.ac-Improve-check-for-magic.patch
@@ -0,0 +1,40 @@
1From 263381ddd46eea2293c70bc811273b66bc52087b Mon Sep 17 00:00:00 2001
2From: Mateusz Marciniec <mateuszmar2@gmail.com>
3Date: Fri, 19 Aug 2022 14:47:49 +0200
4Subject: [PATCH] configure.ac: Improve check for magic
5
6Check whether magic.h header exists before defining HAVE_MAGIC.
7
8Despite library availability there still can be missing header.
9Current test doesn't cover that possibility which will lead compilation
10to fail in case of separate sysroot.
11
12Upstream-Status: Backport
13[https://github.com/util-linux/util-linux/commit/263381ddd46eea2293c70bc811273b66bc52087b]
14
15Signed-off-by: Mateusz Marciniec <mateuszmar2@gmail.com>
16Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com>
17---
18 configure.ac | 6 ++++--
19 1 file changed, 4 insertions(+), 2 deletions(-)
20
21diff --git a/configure.ac b/configure.ac
22index daa8f0dca..968a0daf0 100644
23--- a/configure.ac
24+++ b/configure.ac
25@@ -1570,8 +1570,10 @@ AC_ARG_WITH([libmagic],
26 )
27 AS_IF([test "x$with_libmagic" = xno], [have_magic=no], [
28 AC_CHECK_LIB([magic], [magic_open], [
29- AC_DEFINE([HAVE_MAGIC], [1], [Define to 1 if you have the libmagic present.])
30- MAGIC_LIBS="-lmagic"
31+ AC_CHECK_HEADER(magic.h, [
32+ AC_DEFINE([HAVE_MAGIC], [1], [Define to 1 if you have the libmagic present.])
33+ MAGIC_LIBS="-lmagic"
34+ ])
35 ])
36 ])
37 AC_SUBST([MAGIC_LIBS])
38--
392.37.1
40