Imported Upstream version 4.3.2.467

Former-commit-id: 9c2cb47f45fa221e661ab616387c9cda183f283d
This commit is contained in:
Xamarin Public Jenkins
2016-02-22 11:00:01 -05:00
parent f302175246
commit f3e3aab35a
4097 changed files with 122406 additions and 82300 deletions

View File

@@ -34,7 +34,11 @@
/* sys/time.h (for timeval) is required when using osx 10.3 (but not 10.4) */
/* IOKit is a private framework in iOS, so exclude there */
#if defined(__APPLE__) && !defined(HOST_IOS)
#if defined(__APPLE__) && !defined(HOST_IOS) && !defined(HOST_WATCHOS) && !defined(HOST_APPLETVOS)
#define HAVE_IOKIT 1
#endif
#if defined(HAVE_IOKIT)
#include <sys/time.h>
#include <IOKit/IOKitLib.h>
#include <IOKit/serial/IOSerialKeys.h>
@@ -384,7 +388,7 @@ set_attributes (int fd, int baud_rate, MonoParity parity, int dataBits, MonoStop
if (cfsetospeed (&newtio, baud_rate) < 0 || cfsetispeed (&newtio, baud_rate) < 0)
return FALSE;
} else {
#if __linux__ || (defined(__APPLE__) && !defined(HOST_IOS))
#if __linux__ || defined(HAVE_IOKIT)
/* On Linux to set a custom baud rate, we must set the
* "standard" baud_rate to 38400. On Apple we set it purely
@@ -417,7 +421,7 @@ set_attributes (int fd, int baud_rate, MonoParity parity, int dataBits, MonoStop
{
return FALSE;
}
#elif defined(__APPLE__) && !defined(HOST_IOS)
#elif defined(HAVE_IOKIT)
speed_t speed = baud_rate;
if (ioctl(fd, IOSSIOSPEED, &speed) == -1)
return FALSE;