From 4e1a6f1b3c543b9fbeb882a9e97551f7c58ca65a Mon Sep 17 00:00:00 2001 From: dzwdz Date: Mon, 25 Dec 2023 18:36:02 +0100 Subject: ports: curl :^) had to do a lot of hacky stuff, but it's there. worked on this on and off for a while now --- src/libc/fcntl.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/libc/fcntl.c') diff --git a/src/libc/fcntl.c b/src/libc/fcntl.c index b2d8685..c06f037 100644 --- a/src/libc/fcntl.c +++ b/src/libc/fcntl.c @@ -20,6 +20,10 @@ int fcntl(int fd, int cmd, ...) { int to = va_arg(argp, int); va_end(argp); return _sys_dup(fd, to, DUP_SEARCH); + } else if (cmd == F_GETFD) { + /* curl fucking dies if this returns -1 */ + /* ideally this would return -1 for nonexistent fds */ + return 0; } else { va_end(argp); _klogf("failing fcntl(%d)", cmd); -- cgit v1.2.3