From 437528a10c61a9ea8395fdbde8176491a01225e1 Mon Sep 17 00:00:00 2001 From: auronandace Date: Tue, 19 May 2026 13:54:03 +0100 Subject: [PATCH] add stdio to fcntl includes for constants --- src/header/fcntl/cbindgen.toml | 3 ++- src/header/fcntl/mod.rs | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/header/fcntl/cbindgen.toml b/src/header/fcntl/cbindgen.toml index 8aad3bf8e7..41ac225301 100644 --- a/src/header/fcntl/cbindgen.toml +++ b/src/header/fcntl/cbindgen.toml @@ -10,8 +10,9 @@ # This approach was chosen because unistd.h requires parts of fcntl.h but not the other way around. # # stdarg.h brings in va_list for ... +# stdio.h brings in SEEK_SET, SEEK_CUR, and SEEK_END # sys/stat.h brings in mode_t, off_t and file mode constants -sys_includes = ["stdarg.h", "sys/stat.h"] +sys_includes = ["stdarg.h", "stdio.h", "sys/stat.h"] include_guard = "_RELIBC_FCNTL_H" after_includes = """ #include // for pid_t from sys/types.h diff --git a/src/header/fcntl/mod.rs b/src/header/fcntl/mod.rs index a1fd9ef554..652c06032c 100644 --- a/src/header/fcntl/mod.rs +++ b/src/header/fcntl/mod.rs @@ -112,6 +112,7 @@ pub unsafe extern "C" fn openat( Sys::openat(fd, path, oflag, mode).or_minus_one_errno() } +/// See . #[unsafe(no_mangle)] pub unsafe extern "C" fn posix_fallocate(fd: c_int, offset: off_t, length: off_t) -> c_int { // Length can't be zero and offset must be positive.