From 6fee401c710574a3c0d79c0d628dcbaa933d92f3 Mon Sep 17 00:00:00 2001 From: kay-lambdadelta Date: Sun, 16 Aug 2026 22:32:48 -0700 Subject: [PATCH] Correct open flags for modern NuttX Permalink for further reference: https://github.com/apache/nuttx/blob/273c77128b6698f0c95f0d7cde1d0bb803782021/include/fcntl.h#L47 --- src/unix/nuttx/mod.rs | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/unix/nuttx/mod.rs b/src/unix/nuttx/mod.rs index b1100342b8bc..2380bba1ba40 100644 --- a/src/unix/nuttx/mod.rs +++ b/src/unix/nuttx/mod.rs @@ -473,23 +473,23 @@ pub const F_GETFL: i32 = 0x2; pub const F_SETFD: i32 = 8; pub const F_SETFL: i32 = 9; // open flag settings for open() (and related APIs) -pub const O_RDONLY: i32 = 0x1; -pub const O_WRONLY: i32 = 0x2; -pub const O_RDWR: i32 = 0x3; -pub const O_CREAT: i32 = 0x4; -pub const O_EXCL: i32 = 0x8; -pub const O_NOCTTY: i32 = 0x0; -pub const O_TRUNC: i32 = 0x20; -pub const O_APPEND: i32 = 0x10; -pub const O_NONBLOCK: i32 = 0x40; -pub const O_DSYNC: i32 = 0x80; -pub const O_DIRECT: i32 = 0x200; -pub const O_LARGEFILE: i32 = 0x2000; -pub const O_DIRECTORY: i32 = 0x800; -pub const O_NOFOLLOW: i32 = 0x1000; +pub const O_RDONLY: i32 = 0x0; +pub const O_WRONLY: i32 = 0x1; +pub const O_RDWR: i32 = 0x2; +pub const O_CREAT: i32 = 0x40; +pub const O_EXCL: i32 = 0x80; +pub const O_NOCTTY: i32 = 0x100; +pub const O_TRUNC: i32 = 0x200; +pub const O_APPEND: i32 = 0x400; +pub const O_NONBLOCK: i32 = 0x800; +pub const O_DSYNC: i32 = 0x1000; +pub const O_DIRECT: i32 = 0x4000; +pub const O_LARGEFILE: i32 = 0x8000; +pub const O_DIRECTORY: i32 = 0x10000; +pub const O_NOFOLLOW: i32 = 0x20000; pub const O_NOATIME: i32 = 0x40000; -pub const O_CLOEXEC: i32 = 0x400; -pub const O_ACCMODE: i32 = 0x0003; +pub const O_CLOEXEC: i32 = 0x80000; +pub const O_ACCMODE: i32 = 0x3; pub const AT_FDCWD: i32 = -100; pub const AT_REMOVEDIR: i32 = 0x200;