From a08d11b25bd83ec86d46ced160d4c73ed73beb96 Mon Sep 17 00:00:00 2001 From: Daniel Beer Date: Sat, 13 Nov 2010 13:18:33 +1300 Subject: [PATCH] Fixed build on OS/X. --- uif.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/uif.c b/uif.c index 627f98e..ec03a02 100644 --- a/uif.c +++ b/uif.c @@ -25,7 +25,10 @@ #include #include +#if !(defined(__APPLE__) || defined(WIN32)) #include +#endif + #include #include @@ -85,6 +88,7 @@ static void serial_destroy(transport_t tr_base) free(tr); } +#if !(defined(__APPLE__) || defined(WIN32)) static int open_olimex_iso(const char *device) { int fd = open(device, O_RDWR | O_NOCTTY); @@ -112,6 +116,14 @@ static int open_olimex_iso(const char *device) return fd; } +#else +static int open_olimex_iso(const char *device) +{ + printc_err("open_olimex_iso: this driver is only supported on " + "Linux\n"); + return -1; +} +#endif transport_t uif_open(const char *device, uif_type_t type) {