From 424c816118b18a915f7e57a05331d6c09b463034 Mon Sep 17 00:00:00 2001 From: Sylvain LAFRASSE Date: Fri, 31 Aug 2018 13:13:58 +0200 Subject: [PATCH 1/3] Added O_NONBLOCK flag to open() call for macOS (10.13.6) compatibility. --- src/tty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tty.c b/src/tty.c index 3713452..277127b 100644 --- a/src/tty.c +++ b/src/tty.c @@ -537,7 +537,7 @@ int tty_connect(void) int status; /* Open tty device */ - fd = open(option.tty_device, O_RDWR | O_NOCTTY ); + fd = open(option.tty_device, O_RDWR | O_NOCTTY | O_NONBLOCK ); if (fd < 0) { error_printf_silent("Could not open tty device (%s)", strerror(errno)); From eb70da83ec5c20ddbf760f1934345cb1f6b44355 Mon Sep 17 00:00:00 2001 From: Sylvain LAFRASSE Date: Fri, 31 Aug 2018 13:17:58 +0200 Subject: [PATCH 2/3] Added macOS-related details. --- INSTALL | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/INSTALL b/INSTALL index 2099840..c1722d1 100644 --- a/INSTALL +++ b/INSTALL @@ -252,6 +252,11 @@ not `/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common + On macOS, automake and autoconf are not part of the default OS. In +order to overcome this, you should install them manually. For example: + + brew install automake autoconf + Specifying the System Type ========================== From 3a024ca529229b9c09b9357b4d98155123f28cb1 Mon Sep 17 00:00:00 2001 From: Sylvain LAFRASSE Date: Tue, 4 Sep 2018 20:56:21 +0200 Subject: [PATCH 3/3] Made O_NONBLOCK flag to open() call specific to macOS only. --- src/tty.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/tty.c b/src/tty.c index 277127b..d5a6bd8 100644 --- a/src/tty.c +++ b/src/tty.c @@ -537,7 +537,11 @@ int tty_connect(void) int status; /* Open tty device */ +#ifdef __APPLE__ fd = open(option.tty_device, O_RDWR | O_NOCTTY | O_NONBLOCK ); +#else + fd = open(option.tty_device, O_RDWR | O_NOCTTY); +#endif if (fd < 0) { error_printf_silent("Could not open tty device (%s)", strerror(errno));