[LTP] [PATCH 1/3] include/faccessat.h: Add header file faccessat.h

Yang Xu xuyang2018.jy@fujitsu.com
Sat Aug 5 06:07:56 CEST 2023


Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
---
 include/lapi/faccessat.h | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 include/lapi/faccessat.h

diff --git a/include/lapi/faccessat.h b/include/lapi/faccessat.h
new file mode 100644
index 000000000..f3318fd7a
--- /dev/null
+++ b/include/lapi/faccessat.h
@@ -0,0 +1,21 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (c) 2023 FUJITSU LIMITED. All rights reserved.
+ * Copyright (c) Linux Test Project, 2003-2023
+ * Author: Yang Xu <xuyang2018.jy@fujitsu.com>
+ */
+
+#ifndef FACCESSAT_H
+#define FACCESSAT_H
+
+#include <sys/types.h>
+#include "lapi/syscalls.h"
+
+#ifndef HAVE_FACCESSAT
+int faccessat(int dirfd, const char *pathname, int mode, int flags)
+{
+	return tst_syscall(__NR_faccessat, dirfd, pathname, mode, flags);
+}
+#endif
+
+#endif /* FACCESSAT_H */
-- 
2.39.1



More information about the ltp mailing list