diff --git a/src/util.c b/src/util.c index 8e978311..eb8efd7c 100644 --- a/src/util.c +++ b/src/util.c @@ -435,7 +435,7 @@ void util_hexdump(unsigned char *block, int len) { /** * simple mutex wrapper for better debugging */ -void util_mutex_lock(lock_t which) { +void util_mutex_lock(ff_lock_t which) { if(!_util_initialized) _util_mutex_init(); @@ -445,7 +445,7 @@ void util_mutex_lock(lock_t which) { /** * 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]); } @@ -455,7 +455,7 @@ void util_mutex_unlock(lock_t which) { */ void _util_mutex_init(void) { int err; - lock_t lock; + ff_lock_t lock; if((err = pthread_mutex_lock(&util_mutex))) { fprintf(stderr,"Error locking mutex\n"); @@ -464,7 +464,7 @@ void _util_mutex_init(void) { if(!_util_initialized) { /* 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))) { fprintf(stderr,"Error initializing mutex\n"); exit(-1); diff --git a/src/util.h b/src/util.h index 2b3e2a82..f5c74f41 100644 --- a/src/util.h +++ b/src/util.h @@ -21,12 +21,12 @@ typedef enum { l_plugin, l_memdebug, l_last -} lock_t; +} ff_lock_t; /* debugging lock wrappers */ -extern void util_mutex_lock(lock_t which); -extern void util_mutex_unlock(lock_t which); +extern void util_mutex_lock(ff_lock_t which); +extern void util_mutex_unlock(ff_lock_t which); /* simple hashing functions */ extern uint32_t util_djb_hash_block(unsigned char *data, uint32_t len);