From: "Matt Turner" <mattst88@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/umockdev/files/, dev-util/umockdev/
Date: Tue, 27 Jul 2021 00:50:01 +0000 (UTC) [thread overview]
Message-ID: <1627346991.74b3fb71af8fd929503cd51c76b9d51ba361776f.mattst88@gentoo> (raw)
commit: 74b3fb71af8fd929503cd51c76b9d51ba361776f
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 27 00:48:47 2021 +0000
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Jul 27 00:49:51 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=74b3fb71
dev-util/umockdev: Apply patch to fix glibc-2.33 compatibility
Closes: https://bugs.gentoo.org/774267
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
...lare-__xstat-prototypes-for-glibc-2.32.90.patch | 42 ++++++++++++++++++++++
dev-util/umockdev/umockdev-0.12.1.ebuild | 4 +++
2 files changed, 46 insertions(+)
diff --git a/dev-util/umockdev/files/umockdev-0.12.1-preload-Declare-__xstat-prototypes-for-glibc-2.32.90.patch b/dev-util/umockdev/files/umockdev-0.12.1-preload-Declare-__xstat-prototypes-for-glibc-2.32.90.patch
new file mode 100644
index 00000000000..15f5ddbe99c
--- /dev/null
+++ b/dev-util/umockdev/files/umockdev-0.12.1-preload-Declare-__xstat-prototypes-for-glibc-2.32.90.patch
@@ -0,0 +1,42 @@
+From f1b416400479d861deffb4c5a40422dcdf190e85 Mon Sep 17 00:00:00 2001
+From: Martin Pitt <martin@piware.de>
+Date: Fri, 23 Oct 2020 14:58:50 +0200
+Subject: [PATCH] =?UTF-8?q?preload:=20Declare=20=5F=5Fxstat*()=20prototype?=
+ =?UTF-8?q?s=20for=20glibc=20=E2=89=A5=202.32.9000?=
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Recent glibc deprecated/dropped the `__xstat*()` family from the header
+files, so the build started to fail on "no previous prototype". However,
+umockdev still needs needs to keep the wrappers to run programs that got
+built against an earlier glibc.
+
+Thus declare the prototype explicitly. It should still fail to build if
+glibc defines it differently.
+
+Fixes #108
+---
+ src/libumockdev-preload.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/libumockdev-preload.c b/src/libumockdev-preload.c
+index 9328dc1..9bbec62 100644
+--- a/src/libumockdev-preload.c
++++ b/src/libumockdev-preload.c
+@@ -1215,8 +1215,11 @@ int prefix ## stat ## suffix (const char *path, struct stat ## suffix *st) \
+
+ /* wrapper template for __xstat family; note that we abuse the sticky bit in
+ * the emulated /dev to indicate a block device (the sticky bit has no
+- * real functionality for device nodes) */
++ * real functionality for device nodes)
++ * This family got deprecated/dropped in glibc 2.32.9000, but we still need
++ * to keep it for a while for programs that were built against previous versions */
+ #define WRAP_VERSTAT(prefix, suffix) \
++int prefix ## stat ## suffix (int ver, const char *path, struct stat ## suffix *st); \
+ int prefix ## stat ## suffix (int ver, const char *path, struct stat ## suffix *st) \
+ { \
+ const char *p; \
+--
+2.31.1
+
diff --git a/dev-util/umockdev/umockdev-0.12.1.ebuild b/dev-util/umockdev/umockdev-0.12.1.ebuild
index e66cf61108d..e1f360c4d6e 100644
--- a/dev-util/umockdev/umockdev-0.12.1.ebuild
+++ b/dev-util/umockdev/umockdev-0.12.1.ebuild
@@ -34,6 +34,10 @@ DEPEND="${RDEPEND}
# Tests seem to hang forever
# RESTRICT="test"
+PATCHES=(
+ "${FILESDIR}"/${P}-preload-Declare-__xstat-prototypes-for-glibc-2.32.90.patch
+)
+
pkg_setup() {
use test && python-any-r1_pkg_setup
}
next reply other threads:[~2021-07-27 0:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-27 0:50 Matt Turner [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-11-01 16:07 [gentoo-commits] repo/gentoo:master commit in: dev-util/umockdev/files/, dev-util/umockdev/ Andreas K. Hüttel
2021-11-28 12:04 Andreas Sturmlechner
2020-08-15 6:32 Mart Raudsepp
2016-04-21 4:16 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=1627346991.74b3fb71af8fd929503cd51c76b9d51ba361776f.mattst88@gentoo \
--to=mattst88@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