add macro guard for OS

This commit is contained in:
idea4good
2019-11-10 21:22:24 +08:00
parent 78cf89a6fb
commit e8057f2e3e
5 changed files with 20 additions and 0 deletions

View File

@@ -1,3 +1,5 @@
#if (defined __linux__) || (defined __APPLE__)
#include "../../core_include/api.h"
#include <unistd.h>
#include <pthread.h>
@@ -383,3 +385,5 @@ int c_fifo::write(void* buf, int len)
}
return i;
}
#endif