From 9ffb38d6be446c563b751ffebeef66d6883486db Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 8 Feb 2011 00:22:22 -0800 Subject: [PATCH] Prevent unused variable warnings when monotonic clock isn't available --- OpenAL32/Include/alMain.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index 4e0d03da..310e0d92 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -176,12 +176,12 @@ static __inline void DeleteCriticalSection(CRITICAL_SECTION *cs) static __inline ALuint timeGetTime(void) { #if _POSIX_TIMERS > 0 - static int hasmono = 0; struct timespec ts; int ret = -1; #if defined(_POSIX_MONOTONIC_CLOCK) && (_POSIX_MONOTONIC_CLOCK >= 0) #if _POSIX_MONOTONIC_CLOCK == 0 + static int hasmono = 0; if(hasmono > 0 || (hasmono == 0 && (hasmono=sysconf(_SC_MONOTONIC_CLOCK)) > 0)) #endif -- 2.11.4.GIT