summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitri Stolnikov <horiz0n@gmx.net>2015-12-11 18:45:23 +0100
committerDimitri Stolnikov <horiz0n@gmx.net>2015-12-11 18:45:23 +0100
commitba4fd96622606620ff86141b4d0aa564712a735a (patch)
tree1534bf9d15e3b3daee108efe7baafc03be18abd5
parent6a2d2243110c5cb329bfe0e653581b5c811ba542 (diff)
cross platform usleep()HEADmaster
-rw-r--r--software/libosmosdr/src/libosmosdr.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/software/libosmosdr/src/libosmosdr.c b/software/libosmosdr/src/libosmosdr.c
index 139a96b..67a1517 100644
--- a/software/libosmosdr/src/libosmosdr.c
+++ b/software/libosmosdr/src/libosmosdr.c
@@ -27,6 +27,14 @@
#define min(a, b) (((a) < (b)) ? (a) : (b))
#endif
+//cross platform usleep()
+#ifdef _MSC_VER
+#include <windows.h>
+#define usleep(t) Sleep((t)/1000)
+#else
+#include <unistd.h>
+#endif
+
#include <libusb.h>
/*