diff options
Diffstat (limited to 'poky/meta/recipes-core/util-linux')
-rw-r--r-- | poky/meta/recipes-core/util-linux/util-linux-libuuid_2.38.1.bb (renamed from poky/meta/recipes-core/util-linux/util-linux-libuuid_2.38.bb) | 0 | ||||
-rw-r--r-- | poky/meta/recipes-core/util-linux/util-linux.inc | 4 | ||||
-rw-r--r-- | poky/meta/recipes-core/util-linux/util-linux/0001-check-for-sys-pidfd.h.patch | 53 | ||||
-rw-r--r-- | poky/meta/recipes-core/util-linux/util-linux/0001-configure.ac-Improve-check-for-magic.patch | 40 | ||||
-rw-r--r-- | poky/meta/recipes-core/util-linux/util-linux_2.38.1.bb (renamed from poky/meta/recipes-core/util-linux/util-linux_2.38.bb) | 2 |
5 files changed, 97 insertions, 2 deletions
diff --git a/poky/meta/recipes-core/util-linux/util-linux-libuuid_2.38.bb b/poky/meta/recipes-core/util-linux/util-linux-libuuid_2.38.1.bb index 5d759aed94..5d759aed94 100644 --- a/poky/meta/recipes-core/util-linux/util-linux-libuuid_2.38.bb +++ b/poky/meta/recipes-core/util-linux/util-linux-libuuid_2.38.1.bb diff --git a/poky/meta/recipes-core/util-linux/util-linux.inc b/poky/meta/recipes-core/util-linux/util-linux.inc index c9bddfb7a6..3868b1c41d 100644 --- a/poky/meta/recipes-core/util-linux/util-linux.inc +++ b/poky/meta/recipes-core/util-linux/util-linux.inc @@ -35,6 +35,8 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/util-linux/v${MAJOR_VERSION}/util-lin file://run-ptest \ file://display_testname_for_subtest.patch \ file://avoid_parallel_tests.patch \ + file://0001-check-for-sys-pidfd.h.patch \ + file://0001-configure.ac-Improve-check-for-magic.patch \ " -SRC_URI[sha256sum] = "6d111cbe4d55b336db2f1fbeffbc65b89908704c01136371d32aa9bec373eb64" +SRC_URI[sha256sum] = "60492a19b44e6cf9a3ddff68325b333b8b52b6c59ce3ebd6a0ecaa4c5117e84f" diff --git a/poky/meta/recipes-core/util-linux/util-linux/0001-check-for-sys-pidfd.h.patch b/poky/meta/recipes-core/util-linux/util-linux/0001-check-for-sys-pidfd.h.patch new file mode 100644 index 0000000000..19f57f14bc --- /dev/null +++ b/poky/meta/recipes-core/util-linux/util-linux/0001-check-for-sys-pidfd.h.patch @@ -0,0 +1,53 @@ +From 548bc568f3c735e53fb5b0a5ab6473a3f1457b91 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 7 Aug 2022 14:39:19 -0700 +Subject: [PATCH] check for sys/pidfd.h + +This header in newer glibc defines the signatures of functions +pidfd_send_signal() and pidfd_open() and when these functions are +defined by libc then we need to include the relevant header to get +the definitions. Clang 15+ has started to error out when function +signatures are missing. + +Fixes errors like +misc-utils/kill.c:402:6: error: call to undeclared function 'pidfd_send_signal'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] + if (pidfd_send_signal(pfd, ctl->numsig, &info, 0) < 0) + +Upstream-Status: Submitted [https://github.com/util-linux/util-linux/pull/1769] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + configure.ac | 1 + + include/pidfd-utils.h | 4 +++- + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index a511e93de..fd7d9245f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -342,6 +342,7 @@ AC_CHECK_HEADERS([ \ + sys/mkdev.h \ + sys/mount.h \ + sys/param.h \ ++ sys/pidfd.h \ + sys/prctl.h \ + sys/resource.h \ + sys/sendfile.h \ +diff --git a/include/pidfd-utils.h b/include/pidfd-utils.h +index eddede976..d9e33cbc5 100644 +--- a/include/pidfd-utils.h ++++ b/include/pidfd-utils.h +@@ -4,8 +4,10 @@ + #ifdef HAVE_SYS_SYSCALL_H + # include <sys/syscall.h> + # if defined(SYS_pidfd_send_signal) && defined(SYS_pidfd_open) ++# ifdef HAVE_SYS_PIDFD_H ++# include <sys/pidfd.h> ++# endif + # include <sys/types.h> +- + # ifndef HAVE_PIDFD_SEND_SIGNAL + static inline int pidfd_send_signal(int pidfd, int sig, siginfo_t *info, + unsigned int flags) +-- +2.37.1 + diff --git a/poky/meta/recipes-core/util-linux/util-linux/0001-configure.ac-Improve-check-for-magic.patch b/poky/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/poky/meta/recipes-core/util-linux/util-linux/0001-configure.ac-Improve-check-for-magic.patch @@ -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 + diff --git a/poky/meta/recipes-core/util-linux/util-linux_2.38.bb b/poky/meta/recipes-core/util-linux/util-linux_2.38.1.bb index 8a7b47a0c6..50ecc106dd 100644 --- a/poky/meta/recipes-core/util-linux/util-linux_2.38.bb +++ b/poky/meta/recipes-core/util-linux/util-linux_2.38.1.bb @@ -69,7 +69,7 @@ EXTRA_OECONF = "\ --enable-libuuid --enable-libblkid \ \ --enable-fsck --enable-kill --enable-last --enable-mesg \ - --enable-mount --enable-partx --enable-raw --enable-rfkill \ + --enable-mount --enable-partx --enable-rfkill \ --enable-unshare --enable-write \ \ --disable-bfs --disable-login \ |