public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Thomas Deutschmann" <whissi@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/util-linux/, sys-apps/util-linux/files/
Date: Wed, 25 Mar 2020 14:14:13 +0000 (UTC)	[thread overview]
Message-ID: <1585145440.935c99eeed01166ca391aed5711ad63b566661e5.whissi@gentoo> (raw)

commit:     935c99eeed01166ca391aed5711ad63b566661e5
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 25 14:09:40 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Mar 25 14:10:40 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=935c99ee

sys-apps/util-linux: fix compile error caused by undefined SYS_pidfd_send_signal

Closes: https://bugs.gentoo.org/714100
Package-Manager: Portage-2.3.94, Repoman-2.3.21
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 .../util-linux-2.35.1-cleanup-pidfd-include.patch  | 36 ++++++++++++++
 ...til-linux-2.35.1-include_sys_types-header.patch | 58 ++++++++++++++++++++++
 sys-apps/util-linux/util-linux-2.35.1.ebuild       |  5 ++
 3 files changed, 99 insertions(+)

diff --git a/sys-apps/util-linux/files/util-linux-2.35.1-cleanup-pidfd-include.patch b/sys-apps/util-linux/files/util-linux-2.35.1-cleanup-pidfd-include.patch
new file mode 100644
index 00000000000..85e4d705735
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.35.1-cleanup-pidfd-include.patch
@@ -0,0 +1,36 @@
+From 0a4035ff2e4fd5b5ae0cf8f8665696c2aff53b75 Mon Sep 17 00:00:00 2001
+From: Karel Zak <kzak@redhat.com>
+Date: Tue, 10 Mar 2020 11:43:16 +0100
+Subject: [PATCH] include: cleanup pidfd inckudes
+
+Signed-off-by: Karel Zak <kzak@redhat.com>
+---
+ include/pidfd-utils.h | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/include/pidfd-utils.h b/include/pidfd-utils.h
+index 0baedd2c9..4a6c3a604 100644
+--- a/include/pidfd-utils.h
++++ b/include/pidfd-utils.h
+@@ -3,10 +3,10 @@
+ 
+ #if defined(__linux__)
+ # include <sys/syscall.h>
+-# if defined(SYS_pidfd_send_signal)
++# if defined(SYS_pidfd_send_signal) && defined(SYS_pidfd_open)
+ #  include <sys/types.h>
+ 
+-#  ifndef HAVE_PIDFD_OPEN
++#  ifndef HAVE_PIDFD_SEND_SIGNAL
+ static inline int pidfd_send_signal(int pidfd, int sig, siginfo_t *info,
+ 				    unsigned int flags)
+ {
+@@ -14,7 +14,7 @@ static inline int pidfd_send_signal(int pidfd, int sig, siginfo_t *info,
+ }
+ #  endif
+ 
+-#  ifndef HAVE_PIDFD_SEND_SIGNAL
++#  ifndef HAVE_PIDFD_OPEN
+ static inline int pidfd_open(pid_t pid, unsigned int flags)
+ {
+ 	return syscall(SYS_pidfd_open, pid, flags);

diff --git a/sys-apps/util-linux/files/util-linux-2.35.1-include_sys_types-header.patch b/sys-apps/util-linux/files/util-linux-2.35.1-include_sys_types-header.patch
new file mode 100644
index 00000000000..8c646ee73a9
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.35.1-include_sys_types-header.patch
@@ -0,0 +1,58 @@
+From 3cfde0370d3a8949df0c5bcf447cec6692910ed2 Mon Sep 17 00:00:00 2001
+From: Sami Kerola <kerolasa@iki.fi>
+Date: Sat, 15 Feb 2020 21:12:50 +0000
+Subject: [PATCH] kill: include sys/types.h before checking
+ SYS_pidfd_send_signal
+
+Including sys/types.h must happen before SYS_pidfd_send_signal is checked,
+because that header defines variable in normal conditions.  When sys/types.h
+does not have SYS_pidfd_send_signal then fallback is defined in config.h
+that is included by default, and has therefore worked fine before and after
+this change.
+
+Signed-off-by: Sami Kerola <kerolasa@iki.fi>
+---
+ include/pidfd-utils.h | 18 ++++++++++--------
+ 1 file changed, 10 insertions(+), 8 deletions(-)
+
+diff --git a/include/pidfd-utils.h b/include/pidfd-utils.h
+index 593346576..0baedd2c9 100644
+--- a/include/pidfd-utils.h
++++ b/include/pidfd-utils.h
+@@ -1,26 +1,28 @@
+ #ifndef UTIL_LINUX_PIDFD_UTILS
+ #define UTIL_LINUX_PIDFD_UTILS
+ 
+-#if defined(__linux__) && defined(SYS_pidfd_send_signal)
+-# include <sys/types.h>
++#if defined(__linux__)
+ # include <sys/syscall.h>
++# if defined(SYS_pidfd_send_signal)
++#  include <sys/types.h>
+ 
+-# ifndef HAVE_PIDFD_OPEN
++#  ifndef HAVE_PIDFD_OPEN
+ static inline int pidfd_send_signal(int pidfd, int sig, siginfo_t *info,
+ 				    unsigned int flags)
+ {
+ 	return syscall(SYS_pidfd_send_signal, pidfd, sig, info, flags);
+ }
+-# endif
++#  endif
+ 
+-# ifndef HAVE_PIDFD_SEND_SIGNAL
++#  ifndef HAVE_PIDFD_SEND_SIGNAL
+ static inline int pidfd_open(pid_t pid, unsigned int flags)
+ {
+ 	return syscall(SYS_pidfd_open, pid, flags);
+ }
+-# endif
++#  endif
+ 
+-# define UL_HAVE_PIDFD 1
++#  define UL_HAVE_PIDFD 1
+ 
+-#endif /* __linux__ && SYS_pidfd_send_signal */
++# endif	/* SYS_pidfd_send_signal */
++#endif /* __linux__ */
+ #endif /* UTIL_LINUX_PIDFD_UTILS */

diff --git a/sys-apps/util-linux/util-linux-2.35.1.ebuild b/sys-apps/util-linux/util-linux-2.35.1.ebuild
index c3759ac85c7..6c0d78321cc 100644
--- a/sys-apps/util-linux/util-linux-2.35.1.ebuild
+++ b/sys-apps/util-linux/util-linux-2.35.1.ebuild
@@ -76,6 +76,11 @@ RESTRICT="!test? ( test )"
 
 S="${WORKDIR}/${MY_P}"
 
+PATCHES=(
+	"${FILESDIR}"/util-linux-2.35.1-include_sys_types-header.patch
+	"${FILESDIR}"/util-linux-2.35.1-cleanup-pidfd-include.patch
+)
+
 src_prepare() {
 	default
 


             reply	other threads:[~2020-03-25 14:14 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-25 14:14 Thomas Deutschmann [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-01-08  6:59 [gentoo-commits] repo/gentoo:master commit in: sys-apps/util-linux/, sys-apps/util-linux/files/ Sam James
2024-05-20 15:06 Mike Gilbert
2024-05-11 17:19 Mike Gilbert
2024-04-04  1:17 Sam James
2024-03-28  4:55 Sam James
2024-03-22  0:12 Matt Turner
2023-12-28  2:57 Sam James
2023-05-26  7:24 Sam James
2023-05-23  4:20 Sam James
2023-05-23  3:14 Sam James
2023-03-19  6:07 Sam James
2023-02-09  3:54 Sam James
2022-01-24 16:02 Sam James
2021-10-03 11:28 David Seifert
2021-08-16 14:02 Lars Wendler
2021-08-11 12:30 Lars Wendler
2021-07-30 12:21 Marek Szuba
2021-07-10 21:31 Lars Wendler
2021-06-02 21:14 Georgy Yakovlev
2021-05-23 12:14 David Seifert
2020-12-22 14:43 Andreas K. Hüttel
2020-11-16 17:36 Lars Wendler
2019-05-31  0:58 Lars Wendler
2018-12-29 17:45 Mikle Kolyada
2018-07-13 16:41 Patrick McLean
2018-04-10 19:29 Thomas Deutschmann
2017-12-17 15:48 Lars Wendler
2017-06-09  1:19 Lars Wendler
2017-01-21  0:36 Lars Wendler
2015-09-07 20:02 Lars Wendler
2015-09-07 18:30 Michał Górny
2015-09-07 14:37 Lars Wendler

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=1585145440.935c99eeed01166ca391aed5711ad63b566661e5.whissi@gentoo \
    --to=whissi@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