mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-06-12 03:44:19 +00:00
Patch HID bootloader host app to fix Windows compilation (thanks to Duncan McDonald).
This commit is contained in:
parent
9efce7263c
commit
a9364a866f
@ -13,8 +13,9 @@ hid_bootloader_cli: hid_bootloader_cli.c
|
|||||||
else ifeq ($(OS), WINDOWS)
|
else ifeq ($(OS), WINDOWS)
|
||||||
CC = i586-mingw32msvc-gcc
|
CC = i586-mingw32msvc-gcc
|
||||||
CFLAGS ?= -O2 -Wall
|
CFLAGS ?= -O2 -Wall
|
||||||
|
LDLIB = -lsetupapi -lhid
|
||||||
hid_bootloader_cli.exe: hid_bootloader_cli.c
|
hid_bootloader_cli.exe: hid_bootloader_cli.c
|
||||||
$(CC) $(CFLAGS) -s -DUSE_WIN32 -o hid_bootloader_cli.exe hid_bootloader_cli.c -lhid -lsetupapi
|
$(CC) $(CFLAGS) -s -DUSE_WIN32 -o hid_bootloader_cli.exe hid_bootloader_cli.c $(LDLIB)
|
||||||
|
|
||||||
|
|
||||||
else ifeq ($(OS), MACOSX)
|
else ifeq ($(OS), MACOSX)
|
||||||
|
@ -934,8 +934,8 @@ int printf_verbose(const char *format, ...)
|
|||||||
|
|
||||||
void delay(double seconds)
|
void delay(double seconds)
|
||||||
{
|
{
|
||||||
#ifdef WIN32
|
#ifdef USE_WIN32
|
||||||
Sleep(seconds * 1000.0);
|
sleep(seconds * 1000.0);
|
||||||
#else
|
#else
|
||||||
usleep(seconds * 1000000.0);
|
usleep(seconds * 1000000.0);
|
||||||
#endif
|
#endif
|
||||||
@ -951,7 +951,7 @@ void die(const char *str, ...)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(WIN32)
|
#if defined USE_WIN32
|
||||||
#define strcasecmp stricmp
|
#define strcasecmp stricmp
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user