diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2023-12-15 16:03:40 -0500 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2023-12-15 16:04:50 -0500 |
commit | 8cf1638cc5293b3c7f63d5efd3de31f2a748bcfa (patch) | |
tree | b22b60495c6d564b4e39df56624292992099b9ad | |
parent | 30e0fafb3f39274bd3617397a796c680f9ce4da5 (diff) | |
download | gcompat-8cf1638cc5293b3c7f63d5efd3de31f2a748bcfa.tar.gz gcompat-8cf1638cc5293b3c7f63d5efd3de31f2a748bcfa.tar.bz2 gcompat-8cf1638cc5293b3c7f63d5efd3de31f2a748bcfa.tar.xz gcompat-8cf1638cc5293b3c7f63d5efd3de31f2a748bcfa.zip |
Provide fcntl64 wrapper
Signed-off-by: Alex Gaynor <alex.gaynor@gmail.com>
-rw-r--r-- | libgcompat/unistd.c | 13 |
1 files changed, 13 insertions, 0 deletions
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.h> /* assert */ #include <fcntl.h> /* O_CREAT */ #include <limits.h> /* NGROUPS_MAX */ #include <stddef.h> /* NULL, size_t */ #include <unistd.h> /* confstr, getcwd, getgroups, ... */ #include <errno.h> /* ENOSYS, ENOMEM */ +#include <stdarg.h> /* va_list, va_start, va_end */ #include <stdlib.h> /* calloc */ #include <dlfcn.h> /* dlsym */ #include <string.h> /* 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; +} |