From 5e0adf9fc426870d46950d606ccbb678a17f423d Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sat, 21 May 2016 19:45:19 +0200 Subject: Use platform in semaphore. --- src/semaphore.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/semaphore.cc b/src/semaphore.cc index 59a2c54..5bca9af 100644 --- a/src/semaphore.cc +++ b/src/semaphore.cc @@ -41,8 +41,6 @@ #include #endif -#endif - struct semaphore_private_t { #if DG_PLATFORM == DG_PLATFORM_WINDOWS HANDLE semaphore; @@ -104,8 +102,8 @@ bool Semaphore::wait(const std::chrono::milliseconds& timeout) int rv = gettimeofday(&now, nullptr); assert(rv == 0); - ts->tv_sec = now.tv_sec; - ts->tv_nsec = now.tv_usec * 1000; + ts.tv_sec = now.tv_sec; + ts.tv_nsec = now.tv_usec * 1000; // Add timeout time_t seconds = (time_t)(timeout.count() / 1000); -- cgit v1.2.3