mirror of
https://github.com/wiire-a/pixiewps.git
synced 2025-07-27 07:44:36 +02:00
Fix compilation in mingw-w64
This commit is contained in:
parent
e4d1bde5bb
commit
3fbd36a735
@ -30,6 +30,9 @@
|
|||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <stdarg.h> /* libtommath.c */
|
#include <stdarg.h> /* libtommath.c */
|
||||||
|
#if defined(_WIN32) || defined(__WIN32__)
|
||||||
|
#include <windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
@ -199,10 +202,6 @@ unsigned int hardware_concurrency() {
|
|||||||
#elif defined(__GLIBC__)
|
#elif defined(__GLIBC__)
|
||||||
return get_nprocs();
|
return get_nprocs();
|
||||||
#elif defined(_WIN32) || defined(__WIN32__)
|
#elif defined(_WIN32) || defined(__WIN32__)
|
||||||
# define static /* Workaround to make it compile on some MinGW installations */
|
|
||||||
# include <windows.h>
|
|
||||||
# undef static
|
|
||||||
# define static static
|
|
||||||
SYSTEM_INFO sysinfo;
|
SYSTEM_INFO sysinfo;
|
||||||
GetSystemInfo(&sysinfo);
|
GetSystemInfo(&sysinfo);
|
||||||
return sysinfo.dwNumberOfProcessors;
|
return sysinfo.dwNumberOfProcessors;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user