[LTP] [PATCH 2/8] lapi: add struct xattr_args fallback

Andrea Cervesato andrea.cervesato@suse.de
Mon Jan 27 15:08:20 CET 2025


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

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

diff --git a/configure.ac b/configure.ac
index 6992d75ca300ccc4cc21a45a916f6b3be1a3b8fe..eb1a966322313cf785c25af0f317700418186927 100644
--- a/configure.ac
+++ b/configure.ac
@@ -247,6 +247,7 @@ AC_CHECK_TYPES([struct cachestat_range],,,[#include <sys/mman.h>])
 AC_CHECK_TYPES([struct cachestat],,,[#include <sys/mman.h>])
 AC_CHECK_TYPES([struct mnt_id_req],,,[#include <linux/mount.h>])
 AC_CHECK_TYPES([struct statmount],,,[#include <linux/mount.h>])
+AC_CHECK_TYPES([struct xattr_args],,,[#include <linux/xattr.h>])
 
 # Tools knobs
 
diff --git a/include/lapi/xattr.h b/include/lapi/xattr.h
new file mode 100644
index 0000000000000000000000000000000000000000..b30b24ac0dce04ee225a7609e92fb7af8b545283
--- /dev/null
+++ b/include/lapi/xattr.h
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/*
+ * Copyright (c) 2025 Linux Test Project
+ */
+
+#ifndef LAPI_XATTR_H__
+#define LAPI_XATTR_H__
+
+#include <stdint.h>
+
+#ifndef STRUCT_XATTR_ARGS
+struct xattr_args {
+	void *value;
+	uint32_t size;
+	uint32_t flags;
+};
+#endif
+
+#endif /* LAPI_XATTR_H__ */

-- 
2.43.0



More information about the ltp mailing list