termux-packages/disabled-packages/racket/port.c.patch
Fredrik Fornwall 8ae6bead2f racket: Manipulate TERMUX_PKG_SRCDIR after patch
This allows patching all files the normal way.
2016-11-22 17:12:28 -05:00

37 lines
1.1 KiB
Diff

"The getdtablesize functions has been deprecated by Posix and has been
removed from Android's LB64 ABI. Replace calls to it with the modern
equivalent sysconf(_SC_OPEN_MAX)."
- https://groups.google.com/a/chromium.org/forum/#!topic/chromium-reviews/AXhZapYuHi8
diff -u -r ../../racket-6.4/src/racket/src/port.c ./racket/src/src/port.c
--- ../../racket-6.4/src/racket/src/port.c 2016-01-14 12:11:20.000000000 -0500
+++ ./src/racket/src/port.c 2016-04-10 17:43:40.039414493 -0400
@@ -1090,7 +1090,7 @@
# ifdef USE_ULIMIT
dynamic_fd_size = ulimit(4, 0);
# else
- dynamic_fd_size = getdtablesize();
+ dynamic_fd_size = sysconf(_SC_OPEN_MAX);
# endif
/* divide by bits-per-byte: */
dynamic_fd_size = (dynamic_fd_size + 7) >> 3;
@@ -1365,7 +1365,7 @@
# ifdef FIXED_FD_LIMIT
limit = FIXED_FD_LIMIT;
# else
- limit = getdtablesize();
+ limit = sysconf(_SC_OPEN_MAX);
# endif
# endif
# endif
@@ -10390,7 +10390,7 @@
# ifdef USE_ULIMIT
i = ulimit(4, 0);
# else
- i = getdtablesize();
+ i = sysconf(_SC_OPEN_MAX);
# endif
while (i--) {
int cr;