Skip to content

Commit

Permalink
Fix for Windows build with mingw-w64
Browse files Browse the repository at this point in the history
  • Loading branch information
tmk committed Mar 31, 2022
1 parent 3b04e76 commit dc2681d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PROG = hid_listen

# Target OS (default Linux):
# LINUX / FREEBSD / DARWIN / WINDOWS
OS ?= LINUX
OS ?= WINDOWS

# Defaults
TARGET ?= $(PROG)
Expand All @@ -24,9 +24,9 @@ endif
LIBS = -framework IOKit -framework CoreFoundation
else ifeq ($(OS), WINDOWS)
TARGET = $(PROG).exe
CC = i586-mingw32msvc-gcc
STRIP = i586-mingw32msvc-strip
WINDRES = i586-mingw32msvc-windres
CC = i686-w64-mingw32-gcc
STRIP = i686-w64-mingw32-strip
WINDRES = i686-w64-mingw32-windres
LIBS = -lhid -lsetupapi
KEY_SPC = ~/bin/cert/mykey.spc
KEY_PVK = ~/bin/cert/mykey.pvk
Expand Down
4 changes: 2 additions & 2 deletions rawhid.c
Original file line number Diff line number Diff line change
Expand Up @@ -488,8 +488,8 @@ int rawhid_write(rawhid_t *hid, const void *buf, int len, int timeout_ms)
#define OPERATING_SYSTEM windows
#include <windows.h>
#include <setupapi.h>
#include <ddk/hidsdi.h>
#include <ddk/hidclass.h>
#include <hidsdi.h>
#include <hidclass.h>

// http://msdn.microsoft.com/en-us/library/ms790932.aspx

Expand Down

0 comments on commit dc2681d

Please sign in to comment.