From 3fbd36a7350a6a69fc41517639e3b54cb3eb21f4 Mon Sep 17 00:00:00 2001 From: Stas'M Date: Sun, 22 Oct 2017 15:17:41 +0300 Subject: [PATCH] Fix compilation in mingw-w64 --- src/pixiewps.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/pixiewps.c b/src/pixiewps.c index a42419c..9e5511b 100644 --- a/src/pixiewps.c +++ b/src/pixiewps.c @@ -30,6 +30,9 @@ #include #include #include /* libtommath.c */ +#if defined(_WIN32) || defined(__WIN32__) +#include +#endif #include #include @@ -199,10 +202,6 @@ unsigned int hardware_concurrency() { #elif defined(__GLIBC__) return get_nprocs(); #elif defined(_WIN32) || defined(__WIN32__) -# define static /* Workaround to make it compile on some MinGW installations */ -# include -# undef static -# define static static SYSTEM_INFO sysinfo; GetSystemInfo(&sysinfo); return sysinfo.dwNumberOfProcessors;