diff --git a/3rdparty/apriltag/common/pthreads_cross.c b/3rdparty/apriltag/common/pthreads_cross.c index 3403863f38..a2aaeebe16 100644 --- a/3rdparty/apriltag/common/pthreads_cross.c +++ b/3rdparty/apriltag/common/pthreads_cross.c @@ -22,7 +22,8 @@ SOFTWARE. #include "common/pthreads_cross.h" -#ifdef _WIN32 +//#ifdef _WIN32 +#if defined(_WIN32) && !defined(__MINGW32__) typedef struct { SRWLOCK lock; @@ -246,11 +247,11 @@ unsigned int pcthread_get_num_procs() return sysinfo.dwNumberOfProcessors; } -#else +//#else -#include -unsigned int pcthread_get_num_procs() -{ - return (unsigned int)sysconf(_SC_NPROCESSORS_ONLN); -} +//#include +//unsigned int pcthread_get_num_procs() +//{ +// return (unsigned int)sysconf(_SC_NPROCESSORS_ONLN); +//} #endif diff --git a/3rdparty/apriltag/common/pthreads_cross.h b/3rdparty/apriltag/common/pthreads_cross.h index 5970c67931..043bd8ada3 100644 --- a/3rdparty/apriltag/common/pthreads_cross.h +++ b/3rdparty/apriltag/common/pthreads_cross.h @@ -23,7 +23,8 @@ SOFTWARE. #ifndef __CPTHREAD_H__ #define __CPTHREAD_H__ -#ifdef _WIN32 +//#ifdef _WIN32 +#if defined(_WIN32) && !defined(__MINGW32__) #include #include #else @@ -32,7 +33,8 @@ SOFTWARE. #endif #include -#ifdef _WIN32 +//#ifdef _WIN32 +#if defined(_WIN32) && !defined(__MINGW32__) typedef CRITICAL_SECTION pthread_mutex_t; typedef void pthread_mutexattr_t; diff --git a/3rdparty/apriltag/common/time_util.h b/3rdparty/apriltag/common/time_util.h index c1840495a3..1c438fea17 100644 --- a/3rdparty/apriltag/common/time_util.h +++ b/3rdparty/apriltag/common/time_util.h @@ -36,7 +36,8 @@ either expressed or implied, of the Regents of The University of Michigan. typedef long long suseconds_t; #endif -#ifdef _MSC_VER +//#ifdef _MSC_VER +#if defined(_MSC_VER) && defined(__MINGW32__) inline int gettimeofday(struct timeval* tp, void* tzp) {