termux-packages/x11-packages/wireshark-qt/no-getdtablesize.patch

12 lines
375 B
Diff

--- a/wsutil/ws_pipe.c
+++ b/wsutil/ws_pipe.c
@@ -109,7 +109,7 @@
close(dir_fd);
} else {
/* Slow fallback in case /proc is not mounted */
- for (int fd = STDERR_FILENO + 1; fd < getdtablesize(); fd++) {
+ for (int fd = STDERR_FILENO + 1; fd < sysconf(_SC_OPEN_MAX); fd++) {
fcntl(fd, F_SETFD, FD_CLOEXEC);
}
}