Merge branch 'fcntl-fix' into 'master'

add stdio to fcntl includes for constants

See merge request redox-os/relibc!1357
This commit is contained in:
Jeremy Soller
2026-05-19 07:14:27 -06:00
2 changed files with 3 additions and 1 deletions
+2 -1
View File
@@ -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 <bits/pid-t.h> // for pid_t from sys/types.h
+1
View File
@@ -112,6 +112,7 @@ pub unsafe extern "C" fn openat(
Sys::openat(fd, path, oflag, mode).or_minus_one_errno()
}
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/posix_fallocate.html>.
#[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.