diff options
author | Milan P. Stanić <mps@arvanta.net> | 2020-03-04 23:32:12 +0100 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2020-03-05 12:21:18 +0200 |
commit | 4cf38b14cc2bd7ac030a5f88d045fec8da4f1b65 (patch) | |
tree | 8ccf644abb9b6b459c9f7cce0b7eb4900891e8d3 /main/musl/fix-errno-for-posix_openpt-with-no-free-ptys-availab.patch | |
parent | 349d91f28aca2a756c76780921959e296f58b8d7 (diff) | |
download | aports-4cf38b14cc2bd7ac030a5f88d045fec8da4f1b65.tar.bz2 aports-4cf38b14cc2bd7ac030a5f88d045fec8da4f1b65.tar.xz |
main/musl: backport fixes from 1.2.0
wcwidth wrongly returned 0 for most of planes 4 and up
missing case mapping between U+03F3 and U+037F
wrong cacosh results for arguments with negative imaginary part
wrong catanf/catanl results for various classes of arguments
wrong return value for ungetc with argument outside [0,UCHAR_MAX]
posix_openpt with no ptys available produced wrong errno
Diffstat (limited to 'main/musl/fix-errno-for-posix_openpt-with-no-free-ptys-availab.patch')
-rw-r--r-- | main/musl/fix-errno-for-posix_openpt-with-no-free-ptys-availab.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/main/musl/fix-errno-for-posix_openpt-with-no-free-ptys-availab.patch b/main/musl/fix-errno-for-posix_openpt-with-no-free-ptys-availab.patch new file mode 100644 index 0000000000..a7afdd3dbd --- /dev/null +++ b/main/musl/fix-errno-for-posix_openpt-with-no-free-ptys-availab.patch @@ -0,0 +1,28 @@ +From 4fd0f2056082441a4503f6bfcb787a7c15754518 Mon Sep 17 00:00:00 2001 +From: Rich Felker <dalias@aerifal.cx> +Date: Tue, 22 Oct 2019 10:22:22 -0400 +Subject: [PATCH] fix errno for posix_openpt with no free ptys available + +linux fails the open with ENOSPC, but POSIX mandates EAGAIN. +--- + src/misc/pty.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/misc/pty.c b/src/misc/pty.c +index b9cb5eaa..a0577147 100644 +--- a/src/misc/pty.c ++++ b/src/misc/pty.c +@@ -7,7 +7,9 @@ + + int posix_openpt(int flags) + { +- return open("/dev/ptmx", flags); ++ int r = open("/dev/ptmx", flags); ++ if (r < 0 && errno == ENOSPC) errno = EAGAIN; ++ return r; + } + + int grantpt(int fd) +-- +2.24.1 + |