Skip to content

Commit 00b18da

Browse files
wtarreaupaulmckrcu
authored andcommitted
tools/nolibc: fix the O_* fcntl/open macro definitions for riscv
When RISCV port was imported in 5.2, the O_* macros were taken with their octal value and written as-is in hex, resulting in the getdents64() to fail in nolibc-test. Fixes: 582e84f ("tool headers nolibc: add RISCV support") #5.2 Signed-off-by: Willy Tarreau <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]>
1 parent 1bfbe1f commit 00b18da

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tools/include/nolibc/arch-riscv.h

+7-7
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111
#define O_RDONLY 0
1212
#define O_WRONLY 1
1313
#define O_RDWR 2
14-
#define O_CREAT 0x100
15-
#define O_EXCL 0x200
16-
#define O_NOCTTY 0x400
17-
#define O_TRUNC 0x1000
18-
#define O_APPEND 0x2000
19-
#define O_NONBLOCK 0x4000
20-
#define O_DIRECTORY 0x200000
14+
#define O_CREAT 0x40
15+
#define O_EXCL 0x80
16+
#define O_NOCTTY 0x100
17+
#define O_TRUNC 0x200
18+
#define O_APPEND 0x400
19+
#define O_NONBLOCK 0x800
20+
#define O_DIRECTORY 0x10000
2121

2222
struct sys_stat_struct {
2323
unsigned long st_dev; /* Device. */

0 commit comments

Comments
 (0)