[LTP] [PATCH v2 07/10] lapi: add removexattrat() fallback

Andrea Cervesato
2025-10-07T06:48:47Z

From: Andrea Cervesato <andrea.cervesato@suse.com>

Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
---
configure.ac | 1 +
include/lapi/xattr.h | 8 ++++++++
2 files changed, 9 insertions(+)

diff --git a/configure.ac b/configure.ac
index e43e631ab..e77377a60 100644
--- a/configure.ac
+++ b/configure.ac
@@ -153,6 +153,7 @@ AC_CHECK_FUNCS_ONCE([ \
quotactl_fd \
rand_r \
recvmmsg \
+ removexattrat \
renameat2 \
sched_getcpu \
sendmmsg \
diff --git a/include/lapi/xattr.h b/include/lapi/xattr.h
index 3b664e4e6..2ca05c787 100644
--- a/include/lapi/xattr.h
+++ b/include/lapi/xattr.h
@@ -51,4 +51,12 @@ static inline int getxattrat(int dfd, const char *pathname,
}
#endif

+#ifndef HAVE_FUNC_REMOVEXATTRAT
+static inline int removexattrat(int dfd, const char *pathname,
+ unsigned int at_flags, const char *name)
+{
+ return tst_syscall(__NR_removexattrat, dfd, pathname, at_flags, name);
+}
+#endif
+
#endif /* LAPI_XATTR_H__ */

--
2.51.0