All of lore.kernel.org
 help / color / mirror / Atom feed
From: Emil Velikov <emil.l.velikov@gmail.com>
To: linux-modules@vger.kernel.org
Cc: emil.l.velikov@gmail.com
Subject: [PATCH 2/4] testsuite: add function declarations for __xstat family
Date: Mon,  6 Feb 2023 14:04:47 +0000	[thread overview]
Message-ID: <20230206140449.574631-3-emil.l.velikov@gmail.com> (raw)
In-Reply-To: <20230206140449.574631-1-emil.l.velikov@gmail.com>

From: Emil Velikov <emil.velikov@collabora.com>

As the inline comment says - the declarations have been dropped with
glibc 2.32.9000, as a result the build throws a set of lovely warnings.

Inspired by umockdev, which bears the same license as this project.
https://github.com/martinpitt/umockdev/commit/f1b416400479d861deffb4c5a40422dcdf190e85

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
---
 testsuite/path.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/testsuite/path.c b/testsuite/path.c
index c1ae498..5a291b1 100644
--- a/testsuite/path.c
+++ b/testsuite/path.c
@@ -163,8 +163,15 @@ TS_EXPORT int open ## suffix (const char *path, int flags, ...)	\
 	return _fn(p, flags);					\
 }
 
-/* wrapper template for __xstat family */
+/*
+ * wrapper template for __xstat family
+ * 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)			    \
+TS_EXPORT int prefix ## stat ## suffix (int ver,	    \
+			      const char *path,		    \
+	                      struct stat ## suffix *st);   \
 TS_EXPORT int prefix ## stat ## suffix (int ver,	    \
 			      const char *path,		    \
 	                      struct stat ## suffix *st)    \
-- 
2.39.1


  parent reply	other threads:[~2023-02-06 14:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-06 14:04 [PATCH 0/4] kmod: Various papercuts Emil Velikov
2023-02-06 14:04 ` [PATCH 1/4] treewide: add some static const notations Emil Velikov
2023-02-06 14:04 ` Emil Velikov [this message]
2023-02-08 22:11   ` [PATCH 2/4] testsuite: add function declarations for __xstat family Lucas De Marchi
2023-02-06 14:04 ` [PATCH 3/4] testsuite: fixup KMOD_SYSCONFDIR_NOT_ETC tests Emil Velikov
2023-02-09 15:25   ` Lucas De Marchi
2023-02-09 19:20     ` Lucas De Marchi
2023-02-06 14:04 ` [PATCH 4/4] testsuite/depmod: use defines for the rootfs/lib_modules Emil Velikov

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=20230206140449.574631-3-emil.l.velikov@gmail.com \
    --to=emil.l.velikov@gmail.com \
    --cc=linux-modules@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.