mirror of
https://github.com/wjwwood/serial.git
synced 2026-01-22 19:54:57 +08:00
Merge pull request #66 from bakercp/bugfix_osx_compiling
Add defines to new list_ports methods to compile on OSX.
This commit is contained in:
commit
76c5575f80
@ -1,3 +1,5 @@
|
|||||||
|
#if defined(__linux__)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2014 Craig Lilley <cralilley@gmail.com>
|
* Copyright (c) 2014 Craig Lilley <cralilley@gmail.com>
|
||||||
* This software is made available under the terms of the MIT licence.
|
* This software is made available under the terms of the MIT licence.
|
||||||
@ -329,3 +331,5 @@ serial::list_ports()
|
|||||||
|
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // defined(__linux__)
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
#if defined(__APPLE__)
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
@ -279,3 +281,5 @@ serial::list_ports(void)
|
|||||||
|
|
||||||
return devices_found;
|
return devices_found;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // defined(__APPLE__)
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
#if defined(_WIN32)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2014 Craig Lilley <cralilley@gmail.com>
|
* Copyright (c) 2014 Craig Lilley <cralilley@gmail.com>
|
||||||
* This software is made available under the terms of the MIT licence.
|
* This software is made available under the terms of the MIT licence.
|
||||||
@ -125,3 +127,5 @@ serial::list_ports()
|
|||||||
|
|
||||||
return devices_found;
|
return devices_found;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // #if defined(_WIN32)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user