Skip to content

Commit

Permalink
Avoid to include windows.h in realtime_helpers.hpp
Browse files Browse the repository at this point in the history
  • Loading branch information
traversaro authored Jan 10, 2025
1 parent d54140d commit 1226243
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions include/realtime_tools/realtime_helpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,11 @@
#include <vector>

#ifdef _WIN32
#include <windows.h>
using NATIVE_THREAD_HANDLE = HANDLE;
// Here we directly use void* instead of including windows.h
// and using HANDLE macro to avoid polluting all the downstream
// compilation units that include the public header realtime_helpers.hpp
// with problematic macros like MIN, MAX or ERROR
using NATIVE_THREAD_HANDLE = void*;
#else
using NATIVE_THREAD_HANDLE = pthread_t;
#endif
Expand Down

0 comments on commit 1226243

Please sign in to comment.