Fix BSD regressions

The recent change to crt.S that aggressively aligns the system-provided
stack has been rolled back on non-Linux until we can find a better way,
since it can cause a segfault early in execution on several platforms.

This change fixes a regression in tcgetattr() and tcsetattr() on OpenBSD
and NetBSD caused by 4778cd4d27.

This change has been tested across the runitd test fleet which is green.
This commit is contained in:
Justine Tunney 2023-07-01 00:17:33 -07:00
parent 5a77db2cd5
commit 053681cb97
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
9 changed files with 34 additions and 37 deletions

View file

@ -34,7 +34,6 @@
#define kNtPurgeRxabort 2
#define TCXONC 0x0000540A // linux
#define TIOCGETA 0x40487413 // bsd
#define TIOCSTOP 0x2000746f // bsd
#define TIOCSTART 0x2000746e // bsd
#define TIOCIXON 0x20007481 // xnu
@ -52,7 +51,7 @@ static const char *DescribeFlow(char buf[12], int action) {
static int sys_tcflow_bsd_write(int fd, int cc) {
unsigned char c;
struct termios_bsd term;
if (sys_ioctl(fd, TIOCGETA, &term) == -1) {
if (sys_ioctl(fd, TCGETS, &term) == -1) {
return -1;
}
if ((c = term.c_cc[cc]) != _POSIX_VDISABLE &&