mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 04:43:09 +03:00
seq24: fix build failures due to name clash in "mutex" class
This commit is contained in:
parent
aed2cd32f8
commit
d9db8a9bf5
@ -9,6 +9,8 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "1qpyb7355s21sgy6gibkybxpzx4ikha57a8w644lca6qy9mhcwi3";
|
||||
};
|
||||
|
||||
patches = [ ./mutex_no_nameclash.patch ];
|
||||
|
||||
buildInputs = [ alsaLib gtkmm libjack2 ];
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
|
||||
|
58
pkgs/applications/audio/seq24/mutex_no_nameclash.patch
Normal file
58
pkgs/applications/audio/seq24/mutex_no_nameclash.patch
Normal 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:
|
||||
|
Loading…
Reference in New Issue
Block a user