public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Mike Gilbert" <floppym@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/util-linux/files/, sys-apps/util-linux/
Date: Sat, 11 Feb 2023 22:13:35 +0000 (UTC)	[thread overview]
Message-ID: <1676153594.e3b100621b371849f79a62ba82c9fe2c4ef6b2dd.floppym@gentoo> (raw)

commit:     e3b100621b371849f79a62ba82c9fe2c4ef6b2dd
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 11 22:00:36 2023 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sat Feb 11 22:13:14 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e3b10062

sys-apps/util-linux: backport fix for implicit declartion of pidfd_open

Closes: https://bugs.gentoo.org/893966
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 .../util-linux-2.38.1-check-for-sys-pidfd.h.patch  | 52 ++++++++++++++++++++++
 ....38.1-r1.ebuild => util-linux-2.38.1-r2.ebuild} | 10 ++---
 2 files changed, 55 insertions(+), 7 deletions(-)

diff --git a/sys-apps/util-linux/files/util-linux-2.38.1-check-for-sys-pidfd.h.patch b/sys-apps/util-linux/files/util-linux-2.38.1-check-for-sys-pidfd.h.patch
new file mode 100644
index 000000000000..0a1975fff685
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.38.1-check-for-sys-pidfd.h.patch
@@ -0,0 +1,52 @@
+https://github.com/util-linux/util-linux/pull/1769
+https://bugs.gentoo.org/893966
+
+From 84732a8849a08d42a9a95dcbee9005116be78eb8 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)
+
+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 51deeecd4e..daa8f0dca4 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 eddede9767..d9e33cbc57 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)

diff --git a/sys-apps/util-linux/util-linux-2.38.1-r1.ebuild b/sys-apps/util-linux/util-linux-2.38.1-r2.ebuild
similarity index 98%
rename from sys-apps/util-linux/util-linux-2.38.1-r1.ebuild
rename to sys-apps/util-linux/util-linux-2.38.1-r2.ebuild
index 746b411e2e6e..f49e21c65cae 100644
--- a/sys-apps/util-linux/util-linux-2.38.1-r1.ebuild
+++ b/sys-apps/util-linux/util-linux-2.38.1-r2.ebuild
@@ -5,7 +5,7 @@ EAPI=8
 
 PYTHON_COMPAT=( python3_{9..11} )
 
-inherit toolchain-funcs libtool flag-o-matic bash-completion-r1 usr-ldscript \
+inherit toolchain-funcs autotools flag-o-matic bash-completion-r1 usr-ldscript \
 	pam python-r1 multilib-minimal multiprocessing systemd
 
 MY_PV="${PV/_/-}"
@@ -93,6 +93,7 @@ RESTRICT="!test? ( test )"
 
 PATCHES=(
 	"${FILESDIR}"/${P}-more-posix-exit-on-eof.patch
+	"${FILESDIR}"/util-linux-2.38.1-check-for-sys-pidfd.h.patch
 )
 
 pkg_pretend() {
@@ -153,12 +154,7 @@ src_prepare() {
 
 	fi
 
-	if [[ ${PV} == 9999 ]] ; then
-		po/update-potfiles
-		eautoreconf
-	else
-		elibtoolize
-	fi
+	eautoreconf
 }
 
 lfs_fallocate_test() {


             reply	other threads:[~2023-02-11 22:13 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-11 22:13 Mike Gilbert [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-05-20 17:34 [gentoo-commits] repo/gentoo:master commit in: sys-apps/util-linux/files/, sys-apps/util-linux/ Mike Gilbert
2024-05-09 23:48 Sam James
2024-03-28 16:44 Sam James
2024-03-18 13:43 Sam James
2023-12-29  1:03 Sam James
2023-11-15 10:39 Sam James
2023-08-03 19:03 Sam James
2023-06-29  6:18 Sam James
2023-05-23  3:14 Sam James
2023-05-19 22:29 Mike Gilbert
2022-01-24 16:08 Sam James
2021-12-20  4:57 Sam James
2021-09-03 20:57 Sam James
2020-11-20 20:32 Lars Wendler
2020-04-29 16:29 Mike Gilbert
2019-11-19 10:37 Lars Wendler
2019-05-26  9:52 Lars Wendler
2019-05-18 13:06 Lars Wendler
2019-03-24 19:45 Joshua Kinard
2018-11-11  1:50 Thomas Deutschmann
2018-09-26 13:35 Lars Wendler
2018-03-07  9:28 Lars Wendler
2018-03-07  9:28 Lars Wendler
2017-02-26  0:18 Matt Thode
2016-04-02  4:11 Mike Frysinger
2016-03-07 22:26 Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1676153594.e3b100621b371849f79a62ba82c9fe2c4ef6b2dd.floppym@gentoo \
    --to=floppym@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox