From 8cf1638cc5293b3c7f63d5efd3de31f2a748bcfa Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Fri, 15 Dec 2023 16:03:40 -0500 Subject: Provide fcntl64 wrapper Signed-off-by: Alex Gaynor --- libgcompat/unistd.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'libgcompat') diff --git a/libgcompat/unistd.c b/libgcompat/unistd.c index 011fba2..c2e4a8a 100644 --- a/libgcompat/unistd.c +++ b/libgcompat/unistd.c @@ -1,9 +1,11 @@ + #include /* assert */ #include /* O_CREAT */ #include /* NGROUPS_MAX */ #include /* NULL, size_t */ #include /* confstr, getcwd, getgroups, ... */ #include /* ENOSYS, ENOMEM */ +#include /* va_list, va_start, va_end */ #include /* calloc */ #include /* dlsym */ #include /* strcmp */ @@ -250,3 +252,14 @@ int __close(int fd) { return close(fd); } + +int fcntl64(int fd, int cmd, ...) { + int ret; + va_list va; + + va_start(va, cmd); + ret = fcntl(fd, cmd, va); + va_end(va); + + return ret; +} -- cgit v1.2.3-70-g09d2