diff options
author | dzwdz | 2023-12-25 18:36:02 +0100 |
---|---|---|
committer | dzwdz | 2023-12-25 18:36:02 +0100 |
commit | 4e1a6f1b3c543b9fbeb882a9e97551f7c58ca65a (patch) | |
tree | 8c2048c751db8b98e3033a61b6ad5bbd11a303a9 /src/libc/fcntl.c | |
parent | 64d4330810a37dd9c41a82ae6cc420850ca1e7da (diff) |
ports: curl :^)
had to do a lot of hacky stuff, but it's there.
worked on this on and off for a while now
Diffstat (limited to 'src/libc/fcntl.c')
-rw-r--r-- | src/libc/fcntl.c | 4 |
1 files changed, 4 insertions, 0 deletions
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); |