[LTP] [PATCH] lapi/fcntl.h: fix O_PATH fallback on alpha
XiaoLei Wu
wxl18715129466@gmail.com
Tue Jun 2 08:41:15 CEST 2026
Alpha uses 040000000 for O_PATH while most architectures use
010000000. Match the alpha UAPI value when O_PATH is not provided by
system headers.
Using the generic fallback value on alpha makes tests pass the wrong
open(2) flag value to the kernel, so file descriptors are not opened
with O_PATH semantics.
Signed-off-by: XiaoLei Wu <wxl18715129466@gmail.com>
---
include/lapi/fcntl.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/lapi/fcntl.h b/include/lapi/fcntl.h
index 55a5e8b..6a9ef11 100644
--- a/include/lapi/fcntl.h
+++ b/include/lapi/fcntl.h
@@ -137,6 +137,8 @@
#ifndef O_PATH
# ifdef __sparc__
# define O_PATH 0x1000000
+# elif defined(__alpha__)
+# define O_PATH 040000000
# else
# define O_PATH 010000000
# endif
--
2.43.0
More information about the ltp
mailing list