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:
parent
2df3499e81
commit
b46681e8cc
@ -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__)
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
#if defined(_APPLE_)
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <stdint.h>
|
||||
|
||||
@ -278,4 +280,6 @@ serial::list_ports(void)
|
||||
}
|
||||
|
||||
return devices_found;
|
||||
}
|
||||
}
|
||||
|
||||
#endif // defined(_APPLE_)
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user