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 <fcntl.h>
#include "getopt/getopt.h"
#define usleep(t) Sleep((t)/1000)
#endif
#include "hsdaoh.h"

View file

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

View file

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

View file

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