Skip to content

Commit 0aca662

Browse files
committed
ksx6924: fix building on Windows
1 parent ca739f6 commit 0aca662

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

client/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ endif
5757

5858
LUAPLATFORM = generic
5959
ifneq (,$(findstring MINGW,$(platform)))
60-
LUAPLATFORM = mingw
60+
LUAPLATFORM = mingw
61+
LDLIBS += -lws2_32
6162
else
6263
ifeq ($(platform),Darwin)
6364
LUAPLATFORM = macosx

client/ksx6924/ksx6924core.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@
2121
//-----------------------------------------------------------------------------
2222

2323
#include "ksx6924core.h"
24-
#include <arpa/inet.h>
24+
#ifdef _WIN32
25+
# include <winsock2.h> // ntohl
26+
#else
27+
# include <arpa/inet.h> // ntohl
28+
#endif
2529
#include <string.h>
2630
#include "emv/emvcore.h"
2731
#include "emv/apduinfo.h"

0 commit comments

Comments
 (0)