summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmil Velikov <emil.velikov@collabora.com>2023-02-06 14:04:47 +0000
committerLucas De Marchi <lucas.de.marchi@gmail.com>2023-02-09 07:16:06 -0800
commit6661e5970ab4f7d48a8bed15e3721f2eceaa4bee (patch)
tree51b6f608d2f581588689c473a5dc6c7d62ce4adf
parentefc2e4b4673524220a525f2b6283bf41df99b7af (diff)
downloadkmod-6661e5970ab4f7d48a8bed15e3721f2eceaa4bee.tar.gz
testsuite: add function declarations for __xstat family
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> Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
-rw-r--r--testsuite/path.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/testsuite/path.c b/testsuite/path.c
index c1ae498..5a291b1 100644
--- a/testsuite/path.c
+++ b/testsuite/path.c
@@ -163,10 +163,17 @@ 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) \
{ \
const char *p; \