Merge pull request #75 from sly74fr/master

Added macOS compatibility
This commit is contained in:
Martin Lund 2018-09-04 21:09:21 +02:00 committed by GitHub
commit 7b65f413e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View file

@ -252,6 +252,11 @@ not `/usr/local'. It is recommended to use the following options:
./configure --prefix=/boot/common ./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 Specifying the System Type
========================== ==========================

View file

@ -537,7 +537,11 @@ int tty_connect(void)
int status; int status;
/* Open tty device */ /* Open tty device */
fd = open(option.tty_device, O_RDWR | O_NOCTTY ); #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) if (fd < 0)
{ {
error_printf_silent("Could not open tty device (%s)", strerror(errno)); error_printf_silent("Could not open tty device (%s)", strerror(errno));