mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 12:29:55 +00:00
util-linux: Improve check for magic in configure.ac
Check whether magic.h header exists before defining HAVE_MAGIC. Despite library availability there still can be missing header. Current test doesn't cover that possibility which will lead compilation to fail in case of separate sysroot. Upstream-Status: Backport [https://github.com/util-linux/util-linux/commit/263381ddd46eea2293c70bc811273b66bc52087b] (From OE-Core rev: a93e5c4aba34996fdb9b253a4a8529f33ec114f5) Signed-off-by: Mateusz Marciniec <mateuszmar2@gmail.com> Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
45be110a8d
commit
ffd3d1be39
@@ -36,6 +36,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/util-linux/v${MAJOR_VERSION}/util-lin
|
|||||||
file://display_testname_for_subtest.patch \
|
file://display_testname_for_subtest.patch \
|
||||||
file://avoid_parallel_tests.patch \
|
file://avoid_parallel_tests.patch \
|
||||||
file://0001-check-for-sys-pidfd.h.patch \
|
file://0001-check-for-sys-pidfd.h.patch \
|
||||||
|
file://0001-configure.ac-Improve-check-for-magic.patch \
|
||||||
"
|
"
|
||||||
|
|
||||||
SRC_URI[sha256sum] = "60492a19b44e6cf9a3ddff68325b333b8b52b6c59ce3ebd6a0ecaa4c5117e84f"
|
SRC_URI[sha256sum] = "60492a19b44e6cf9a3ddff68325b333b8b52b6c59ce3ebd6a0ecaa4c5117e84f"
|
||||||
|
|||||||
+40
@@ -0,0 +1,40 @@
|
|||||||
|
From 263381ddd46eea2293c70bc811273b66bc52087b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Mateusz Marciniec <mateuszmar2@gmail.com>
|
||||||
|
Date: Fri, 19 Aug 2022 14:47:49 +0200
|
||||||
|
Subject: [PATCH] configure.ac: Improve check for magic
|
||||||
|
|
||||||
|
Check whether magic.h header exists before defining HAVE_MAGIC.
|
||||||
|
|
||||||
|
Despite library availability there still can be missing header.
|
||||||
|
Current test doesn't cover that possibility which will lead compilation
|
||||||
|
to fail in case of separate sysroot.
|
||||||
|
|
||||||
|
Upstream-Status: Backport
|
||||||
|
[https://github.com/util-linux/util-linux/commit/263381ddd46eea2293c70bc811273b66bc52087b]
|
||||||
|
|
||||||
|
Signed-off-by: Mateusz Marciniec <mateuszmar2@gmail.com>
|
||||||
|
Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com>
|
||||||
|
---
|
||||||
|
configure.ac | 6 ++++--
|
||||||
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/configure.ac b/configure.ac
|
||||||
|
index daa8f0dca..968a0daf0 100644
|
||||||
|
--- a/configure.ac
|
||||||
|
+++ b/configure.ac
|
||||||
|
@@ -1570,8 +1570,10 @@ AC_ARG_WITH([libmagic],
|
||||||
|
)
|
||||||
|
AS_IF([test "x$with_libmagic" = xno], [have_magic=no], [
|
||||||
|
AC_CHECK_LIB([magic], [magic_open], [
|
||||||
|
- AC_DEFINE([HAVE_MAGIC], [1], [Define to 1 if you have the libmagic present.])
|
||||||
|
- MAGIC_LIBS="-lmagic"
|
||||||
|
+ AC_CHECK_HEADER(magic.h, [
|
||||||
|
+ AC_DEFINE([HAVE_MAGIC], [1], [Define to 1 if you have the libmagic present.])
|
||||||
|
+ MAGIC_LIBS="-lmagic"
|
||||||
|
+ ])
|
||||||
|
])
|
||||||
|
])
|
||||||
|
AC_SUBST([MAGIC_LIBS])
|
||||||
|
--
|
||||||
|
2.37.1
|
||||||
|
|
||||||
Reference in New Issue
Block a user