Add MacOS support to NetworkClient.cpp
This commit is contained in:
parent
bd6ec4c41e
commit
cbb13b0d22
1 changed files with 14 additions and 2 deletions
|
|
@ -10,10 +10,22 @@
|
||||||
#include "RGBController_Network.h"
|
#include "RGBController_Network.h"
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef _WIN32
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
#define MSG_NOSIGNAL 0
|
#define MSG_NOSIGNAL 0
|
||||||
#else
|
#endif
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
#include <unistd.h>
|
||||||
|
#define MSG_NOSIGNAL 0
|
||||||
|
|
||||||
|
static void Sleep(unsigned int milliseconds)
|
||||||
|
{
|
||||||
|
usleep(1000 * milliseconds);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __linux__
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
static void Sleep(unsigned int milliseconds)
|
static void Sleep(unsigned int milliseconds)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue