mirror of
https://github.com/owntone/owntone-server.git
synced 2025-04-20 02:37:26 -04:00
rename lock_t to ff_lock_t to prevent solaris breakage
This commit is contained in:
parent
a4dea03121
commit
e6d550dd49
@ -435,7 +435,7 @@ void util_hexdump(unsigned char *block, int len) {
|
|||||||
/**
|
/**
|
||||||
* simple mutex wrapper for better debugging
|
* simple mutex wrapper for better debugging
|
||||||
*/
|
*/
|
||||||
void util_mutex_lock(lock_t which) {
|
void util_mutex_lock(ff_lock_t which) {
|
||||||
if(!_util_initialized)
|
if(!_util_initialized)
|
||||||
_util_mutex_init();
|
_util_mutex_init();
|
||||||
|
|
||||||
@ -445,7 +445,7 @@ void util_mutex_lock(lock_t which) {
|
|||||||
/**
|
/**
|
||||||
* simple mutex wrapper for better debugging
|
* simple mutex wrapper for better debugging
|
||||||
*/
|
*/
|
||||||
void util_mutex_unlock(lock_t which) {
|
void util_mutex_unlock(ff_lock_t which) {
|
||||||
pthread_mutex_unlock(&util_locks[(int)which]);
|
pthread_mutex_unlock(&util_locks[(int)which]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -455,7 +455,7 @@ void util_mutex_unlock(lock_t which) {
|
|||||||
*/
|
*/
|
||||||
void _util_mutex_init(void) {
|
void _util_mutex_init(void) {
|
||||||
int err;
|
int err;
|
||||||
lock_t lock;
|
ff_lock_t lock;
|
||||||
|
|
||||||
if((err = pthread_mutex_lock(&util_mutex))) {
|
if((err = pthread_mutex_lock(&util_mutex))) {
|
||||||
fprintf(stderr,"Error locking mutex\n");
|
fprintf(stderr,"Error locking mutex\n");
|
||||||
@ -464,7 +464,7 @@ void _util_mutex_init(void) {
|
|||||||
|
|
||||||
if(!_util_initialized) {
|
if(!_util_initialized) {
|
||||||
/* now, walk through and manually initialize the mutexes */
|
/* now, walk through and manually initialize the mutexes */
|
||||||
for(lock=(lock_t)0; lock < l_last; lock++) {
|
for(lock=(ff_lock_t)0; lock < l_last; lock++) {
|
||||||
if((err = pthread_mutex_init(&util_locks[(int)lock],NULL))) {
|
if((err = pthread_mutex_init(&util_locks[(int)lock],NULL))) {
|
||||||
fprintf(stderr,"Error initializing mutex\n");
|
fprintf(stderr,"Error initializing mutex\n");
|
||||||
exit(-1);
|
exit(-1);
|
||||||
|
@ -21,12 +21,12 @@ typedef enum {
|
|||||||
l_plugin,
|
l_plugin,
|
||||||
l_memdebug,
|
l_memdebug,
|
||||||
l_last
|
l_last
|
||||||
} lock_t;
|
} ff_lock_t;
|
||||||
|
|
||||||
/* debugging lock wrappers */
|
/* debugging lock wrappers */
|
||||||
|
|
||||||
extern void util_mutex_lock(lock_t which);
|
extern void util_mutex_lock(ff_lock_t which);
|
||||||
extern void util_mutex_unlock(lock_t which);
|
extern void util_mutex_unlock(ff_lock_t which);
|
||||||
|
|
||||||
/* simple hashing functions */
|
/* simple hashing functions */
|
||||||
extern uint32_t util_djb_hash_block(unsigned char *data, uint32_t len);
|
extern uint32_t util_djb_hash_block(unsigned char *data, uint32_t len);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user