updated serial.c to work with recent MacOS

This commit is contained in:
f007bfc1d8254ff6b0be052029dd5486 2023-12-28 16:13:13 +09:00
parent e10fc4ac7e
commit 266665cebf

View file

@ -144,7 +144,7 @@ int serial_init(void) {
wire_name = strdup(tty_dev_name);
}
}
#elif defined(LINUX)
#elif defined(LINUX) || defined(__APPLE__)
/* Unix98 PTY (Preferred) */
if ((wire_fd = open("/dev/ptmx", O_RDWR | O_NONBLOCK, 0666)) >= 0) {
grantpt(wire_fd);