diff --git a/iceoryx_hoofs/include/iceoryx_hoofs/internal/posix_wrapper/semaphore_interface.hpp b/iceoryx_hoofs/include/iceoryx_hoofs/internal/posix_wrapper/semaphore_interface.hpp index 4ce64d119f2..4237df0b4ad 100644 --- a/iceoryx_hoofs/include/iceoryx_hoofs/internal/posix_wrapper/semaphore_interface.hpp +++ b/iceoryx_hoofs/include/iceoryx_hoofs/internal/posix_wrapper/semaphore_interface.hpp @@ -18,6 +18,7 @@ #include "iceoryx_hoofs/cxx/expected.hpp" #include "iceoryx_hoofs/internal/units/duration.hpp" +#include "iceoryx_hoofs/platform/semaphore.hpp" #include "iceoryx_hoofs/posix_wrapper/semaphore.hpp" namespace iox diff --git a/iceoryx_hoofs/include/iceoryx_hoofs/posix_wrapper/unnamed_semaphore.hpp b/iceoryx_hoofs/include/iceoryx_hoofs/posix_wrapper/unnamed_semaphore.hpp index 112d9f308f0..217387f1363 100644 --- a/iceoryx_hoofs/include/iceoryx_hoofs/posix_wrapper/unnamed_semaphore.hpp +++ b/iceoryx_hoofs/include/iceoryx_hoofs/posix_wrapper/unnamed_semaphore.hpp @@ -38,7 +38,7 @@ class UnnamedSemaphore final : public internal::SemaphoreInterface; - friend class SemaphoreInterface; + friend class internal::SemaphoreInterface; UnnamedSemaphore() noexcept = default; iox_sem_t* getHandle() noexcept; diff --git a/iceoryx_hoofs/platform/win/include/iceoryx_hoofs/platform/semaphore.hpp b/iceoryx_hoofs/platform/win/include/iceoryx_hoofs/platform/semaphore.hpp index 8276a47d443..4165c96d664 100644 --- a/iceoryx_hoofs/platform/win/include/iceoryx_hoofs/platform/semaphore.hpp +++ b/iceoryx_hoofs/platform/win/include/iceoryx_hoofs/platform/semaphore.hpp @@ -32,6 +32,9 @@ #include #define SEM_FAILED 0 +// win32 API page talks about maximum allowed value without defining it or how to obtain. +// We use the SEM_VALUE_MAX from linux which is 2^31 - 1 +#define SEM_VALUE_MAX 2147483647 struct iox_sem_t {