diff options
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); |