summaryrefslogtreecommitdiffstats
path: root/debian/patches/platform-quirks.diff
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 03:34:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 03:34:38 +0000
commitdf7e23e93574873618aee45820803ee4c38d9698 (patch)
treee4772d1825878a561dec4bf04262aff22cc8cef1 /debian/patches/platform-quirks.diff
parentAdding upstream version 3.3a. (diff)
downloadtmux-debian/3.3a-5.tar.xz
tmux-debian/3.3a-5.zip
Adding debian version 3.3a-5.debian/3.3a-5
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/platform-quirks.diff')
-rw-r--r--debian/patches/platform-quirks.diff47
1 files changed, 47 insertions, 0 deletions
diff --git a/debian/patches/platform-quirks.diff b/debian/patches/platform-quirks.diff
new file mode 100644
index 0000000..e46fe56
--- /dev/null
+++ b/debian/patches/platform-quirks.diff
@@ -0,0 +1,47 @@
+Description: Platform-specific fixes
+ * Define PATH_MAX, MAX_IOV for Hurd.
+ * Add workaround for broken GNU/kFreeBSD system headers.
+Author: Karl Ferdinand Ebert <kfebert@gmail.com>
+Author: Romain Francoise <rfrancoise@debian.org>
+Author: James Clarke <jrtc27@debian.org>
+Bug-Debian: http://bugs.debian.org/609333
+Forwarded: not-needed
+
+--- a/compat.h
++++ b/compat.h
+@@ -21,6 +21,20 @@
+ #include <sys/ioctl.h>
+ #include <sys/uio.h>
+
++/*
++ * Shouldn't be needed, but GNU/kFreeBSD headers are currently slightly broken.
++ * The glibc limits.h eventually includes the FreeBSD limits-related headers,
++ * which don't define a TTY_NAME_MAX. However, anything (in)directly including
++ * the glibc sys/param.h will include the glibc bits/param.h, which defines
++ * TTY_NAME_MAX as SPECNAMELEN, i.e. 63, which differs from our fallback of 32.
++ * Thus, without this hack, different source files can (and do) end up with
++ * different values for TTY_NAME_MAX, which among other things affects the
++ * layout of struct window_pane due to the tty buffer.
++ */
++#ifdef __FreeBSD_kernel__
++#include <sys/param.h>
++#endif
++
+ #include <fnmatch.h>
+ #include <limits.h>
+ #include <stdio.h>
+@@ -289,6 +303,14 @@ void explicit_bzero(void *, size_t);
+ int getdtablecount(void);
+ #endif
+
++#ifndef PATH_MAX
++#define PATH_MAX 4096
++#endif
++
++#ifndef IOV_MAX
++#define IOV_MAX 1024
++#endif
++
+ #ifndef HAVE_CLOSEFROM
+ /* closefrom.c */
+ void closefrom(int);