diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-01-26 03:27:23 +0000 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-01-26 03:27:23 +0000 |
commit | 59e9bd2f6ad0a5b0d1923729e5c37331bb086d99 (patch) | |
tree | 4d575e34794fffed151cb4363e06ba38aac66045 /user/xterm/posix-ptmx.patch | |
parent | f6c2d0df8a9b1a16c3419a5dc8e0db2af97b9842 (diff) | |
download | packages-59e9bd2f6ad0a5b0d1923729e5c37331bb086d99.tar.gz packages-59e9bd2f6ad0a5b0d1923729e5c37331bb086d99.tar.bz2 packages-59e9bd2f6ad0a5b0d1923729e5c37331bb086d99.tar.xz packages-59e9bd2f6ad0a5b0d1923729e5c37331bb086d99.zip |
user/xterm: what a day
The /dev/ptmx code wasn't POSIX enough for musl.
And utmps wasn't being used properly.
Fix both.
Diffstat (limited to 'user/xterm/posix-ptmx.patch')
-rw-r--r-- | user/xterm/posix-ptmx.patch | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/user/xterm/posix-ptmx.patch b/user/xterm/posix-ptmx.patch new file mode 100644 index 000000000..351aba9ab --- /dev/null +++ b/user/xterm/posix-ptmx.patch @@ -0,0 +1,21 @@ +--- xterm/main.c.old ++++ xterm/main.c +@@ -2654,7 +2654,7 @@ get_pty(int *pty, char *from GCC_UNUSED) + close(opened_tty); + opened_tty = -1; + } +-#elif defined(HAVE_POSIX_OPENPT) && defined(HAVE_PTSNAME) && defined(HAVE_GRANTPT_PTY_ISATTY) ++#elif defined(HAVE_POSIX_OPENPT) && defined(HAVE_PTSNAME) + if ((*pty = posix_openpt(O_RDWR)) >= 0) { + char *name = ptsname(*pty); + if (name != 0) { +@@ -3735,7 +3735,7 @@ spawnXTerm(XtermWidget xw) + /* + * now in child process + */ +-#if defined(_POSIX_SOURCE) || defined(SVR4) || defined(__convex__) || defined(__SCO__) || defined(__QNX__) ++#if defined(_POSIX_VERSION) || defined(SVR4) || defined(__convex__) || defined(__SCO__) || defined(__QNX__) + int pgrp = setsid(); /* variable may not be used... */ + #else + int pgrp = getpid(); + |