From d7ea8ac95ad2a6d073164e60d3ce4447071038a5 Mon Sep 17 00:00:00 2001 From: Fabien Spindler Date: Wed, 24 Jul 2024 23:24:57 +0200 Subject: [PATCH] Fix build on windows with msvc --- 3rdparty/apriltag/common/pthreads_cross.c | 6 +++--- 3rdparty/apriltag/common/time_util.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/3rdparty/apriltag/common/pthreads_cross.c b/3rdparty/apriltag/common/pthreads_cross.c index a2aaeebe16..5c7d001241 100644 --- a/3rdparty/apriltag/common/pthreads_cross.c +++ b/3rdparty/apriltag/common/pthreads_cross.c @@ -45,10 +45,10 @@ int pthread_create(pthread_t *thread, pthread_attr_t *attr, void *(*start_routin if (thread == NULL || start_routine == NULL) return 1; -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wcast-function-type" +//#pragma GCC diagnostic push +//#pragma GCC diagnostic ignored "-Wcast-function-type" *thread = (HANDLE) CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)start_routine, arg, 0, NULL); -#pragma GCC diagnostic pop +//#pragma GCC diagnostic pop if (*thread == NULL) return 1; return 0; diff --git a/3rdparty/apriltag/common/time_util.h b/3rdparty/apriltag/common/time_util.h index 1c438fea17..07533a900e 100644 --- a/3rdparty/apriltag/common/time_util.h +++ b/3rdparty/apriltag/common/time_util.h @@ -37,7 +37,7 @@ typedef long long suseconds_t; #endif //#ifdef _MSC_VER -#if defined(_MSC_VER) && defined(__MINGW32__) +#if defined(_MSC_VER) || defined(__MINGW32__) inline int gettimeofday(struct timeval* tp, void* tzp) {