Skip to content

Commit

Permalink
Fix build on windows with msvc
Browse files Browse the repository at this point in the history
  • Loading branch information
fspindle committed Jul 24, 2024
1 parent 6a2968c commit d7ea8ac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions 3rdparty/apriltag/common/pthreads_cross.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion 3rdparty/apriltag/common/time_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit d7ea8ac

Please sign in to comment.