tmux: Generalize patch for upstream inclusion
This commit is contained in:
parent
a236799e73
commit
1e9be3fc14
@ -1,12 +1,18 @@
|
||||
diff -u -r ../tmux-2.4/compat/imsg.c ./compat/imsg.c
|
||||
--- ../tmux-2.4/compat/imsg.c 2017-04-19 14:49:29.000000000 +0200
|
||||
+++ ./compat/imsg.c 2017-04-22 02:21:48.592932564 +0200
|
||||
@@ -73,7 +73,7 @@
|
||||
diff -u -r ../tmux-3.1b/compat/imsg.c ./compat/imsg.c
|
||||
--- ../tmux-3.1b/compat/imsg.c 2020-05-04 08:06:57.000000000 +0000
|
||||
+++ ./compat/imsg.c 2020-10-02 18:37:55.651051000 +0000
|
||||
@@ -73,7 +73,13 @@
|
||||
again:
|
||||
if (getdtablecount() + imsg_fd_overhead +
|
||||
(int)((CMSG_SPACE(sizeof(int))-CMSG_SPACE(0))/sizeof(int))
|
||||
- >= getdtablesize()) {
|
||||
+ >= sysconf(_SC_OPEN_MAX)) {
|
||||
+ >=
|
||||
+#ifdef HAVE_SYSCONF
|
||||
+ sysconf(_SC_OPEN_MAX)
|
||||
+#else
|
||||
+ getdtablesize()
|
||||
+#endif
|
||||
+ ) {
|
||||
errno = EAGAIN;
|
||||
free(ifd);
|
||||
return (-1);
|
||||
|
Loading…
Reference in New Issue
Block a user