1
0
mirror of https://github.com/wjwwood/serial.git synced 2026-01-22 11:44:53 +08:00

Add defines to new list_ports methods to compile on OSX.

This commit is contained in:
Christopher Baker 2014-07-02 10:47:45 -05:00
parent 2df3499e81
commit b46681e8cc
3 changed files with 13 additions and 1 deletions

View File

@ -1,3 +1,5 @@
#if defined(__linux__)
/*
* Copyright (c) 2014 Craig Lilley <cralilley@gmail.com>
* This software is made available under the terms of the MIT licence.
@ -329,3 +331,5 @@ serial::list_ports()
return results;
}
#endif // defined(__linux__)

View File

@ -1,3 +1,5 @@
#if defined(_APPLE_)
#include <sys/param.h>
#include <stdint.h>
@ -279,3 +281,5 @@ serial::list_ports(void)
return devices_found;
}
#endif // defined(_APPLE_)

View File

@ -1,3 +1,5 @@
#if defined(_WIN32)
/*
* Copyright (c) 2014 Craig Lilley <cralilley@gmail.com>
* This software is made available under the terms of the MIT licence.
@ -125,3 +127,5 @@ serial::list_ports()
return devices_found;
}
#endif // #if defined(_WIN32)