diff --git a/stepmania/src/arch/Threads/Threads_Pthreads.cpp b/stepmania/src/arch/Threads/Threads_Pthreads.cpp index 737ffed5c7..30cb1bfe0f 100644 --- a/stepmania/src/arch/Threads/Threads_Pthreads.cpp +++ b/stepmania/src/arch/Threads/Threads_Pthreads.cpp @@ -1,5 +1,6 @@ #include "global.h" #include "Threads_Pthreads.h" +#include "RageUtil.h" #include #include @@ -225,7 +226,7 @@ SemaImpl_Pthreads::~SemaImpl_Pthreads() int SemaImpl_Pthreads::GetValue() const { int ret; - sem_getvalue( &sem, &ret ); + sem_getvalue( const_cast(&sem), &ret ); return ret; } diff --git a/stepmania/src/arch/Threads/Threads_Pthreads.h b/stepmania/src/arch/Threads/Threads_Pthreads.h index 3dd73fc407..d171473118 100644 --- a/stepmania/src/arch/Threads/Threads_Pthreads.h +++ b/stepmania/src/arch/Threads/Threads_Pthreads.h @@ -7,6 +7,8 @@ #define PID_BASED_THREADS #endif +#include + class ThreadImpl_Pthreads: public ThreadImpl { public: