seq24: fix build failures due to name clash in "mutex" class

This commit is contained in:
obadz 2016-09-07 01:27:23 +01:00
parent aed2cd32f8
commit d9db8a9bf5
2 changed files with 60 additions and 0 deletions

View File

@ -9,6 +9,8 @@ stdenv.mkDerivation rec {
sha256 = "1qpyb7355s21sgy6gibkybxpzx4ikha57a8w644lca6qy9mhcwi3";
};
patches = [ ./mutex_no_nameclash.patch ];
buildInputs = [ alsaLib gtkmm libjack2 ];
nativeBuildInputs = [ pkgconfig ];

View File

@ -0,0 +1,58 @@
--- a/src/mutex.cpp
+++ b/src/mutex.cpp
@@ -20,23 +20,23 @@
#include "mutex.h"
-const pthread_mutex_t mutex::recmutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
+const pthread_mutex_t mutex_no_nameclash::recmutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
const pthread_cond_t condition_var::cond = PTHREAD_COND_INITIALIZER;
-mutex::mutex( )
+mutex_no_nameclash::mutex_no_nameclash( )
{
m_mutex_lock = recmutex;
}
void
-mutex::lock( )
+mutex_no_nameclash::lock( )
{
pthread_mutex_lock( &m_mutex_lock );
}
void
-mutex::unlock( )
+mutex_no_nameclash::unlock( )
{
pthread_mutex_unlock( &m_mutex_lock );
}
--- a/src/mutex.h
+++ b/src/mutex.h
@@ -24,7 +24,7 @@
#include <pthread.h>
-class mutex {
+class mutex_no_nameclash {
private:
@@ -37,14 +37,14 @@
public:
- mutex();
+ mutex_no_nameclash();
void lock();
void unlock();
};
-class condition_var : public mutex {
+class condition_var : public mutex_no_nameclash {
private: