commit: 3fd09cc53f57d28951e10d3a5a33bdc3392d3d00
parent 10077f207437c59b9b84e8689755fa4e15411963
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Sun, 3 Aug 2025 20:47:33 +0200
sys-libs/gcompat: Provide fcntl64 wrapper
Diffstat:
1 file changed, 44 insertions(+), 0 deletions(-)
diff --git a/patches/sys-libs/gcompat/0001-Provide-fcntl64-wrapper.patch b/patches/sys-libs/gcompat/0001-Provide-fcntl64-wrapper.patch
@@ -0,0 +1,44 @@
+From 8cf1638cc5293b3c7f63d5efd3de31f2a748bcfa Mon Sep 17 00:00:00 2001
+From: Alex Gaynor <alex.gaynor@gmail.com>
+Date: Fri, 15 Dec 2023 16:03:40 -0500
+Subject: [PATCH] Provide fcntl64 wrapper
+
+Signed-off-by: Alex Gaynor <alex.gaynor@gmail.com>
+---
+ libgcompat/unistd.c | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+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;
++}
+--
+2.49.1
+