fix Windows build

This commit is contained in:
Steve Markgraf 2024-12-14 14:14:20 +01:00
parent df8c676c64
commit 5d80559044
4 changed files with 7 additions and 7 deletions

View file

@ -32,6 +32,7 @@
#include <io.h> #include <io.h>
#include <fcntl.h> #include <fcntl.h>
#include "getopt/getopt.h" #include "getopt/getopt.h"
#define usleep(t) Sleep((t)/1000)
#endif #endif
#include "hsdaoh.h" #include "hsdaoh.h"

View file

@ -40,6 +40,7 @@
#include <winsock2.h> #include <winsock2.h>
#include <ws2tcpip.h> #include <ws2tcpip.h>
#include "getopt/getopt.h" #include "getopt/getopt.h"
#define usleep(t) Sleep((t)/1000)
#endif #endif
#include <pthread.h> #include <pthread.h>

View file

@ -43,6 +43,7 @@
#else #else
#include <windows.h> #include <windows.h>
#include "getopt/getopt.h" #include "getopt/getopt.h"
#define usleep(t) Sleep((t)/1000)
#endif #endif
#include "hsdaoh.h" #include "hsdaoh.h"

View file

@ -31,20 +31,17 @@
#include <stdbool.h> #include <stdbool.h>
#ifndef _WIN32 #ifndef _WIN32
#include <unistd.h> #include <unistd.h>
#endif #include <endian.h>
#else
#ifdef _MSC_VER
#include <windows.h> #include <windows.h>
#define usleep(t) Sleep((t)/1000) #define usleep(t) Sleep((t)/1000)
#else #define le32toh(x) (x)
#include <unistd.h> #define le16toh(x) (x)
#endif #endif
#include <inttypes.h> #include <inttypes.h>
#include <endian.h>
#include <libusb.h> #include <libusb.h>
#include <libuvc/libuvc.h> #include <libuvc/libuvc.h>
//#include <math.h>
#include <hsdaoh_i2c.h> #include <hsdaoh_i2c.h>
#include <hsdaoh.h> #include <hsdaoh.h>
#include <crc.h> #include <crc.h>