get things building with glibc-2.8 http://bugs.gentoo.org/248100 --- include/common.h +++ include/common.h @@ -23,6 +23,7 @@ #ifndef __COMMON_H #define __COMMON_H +#include #include #include #include "queue.h" --- src/queue.c +++ src/queue.c @@ -34,8 +34,8 @@ #define q_lock(q, cnt) do { int _old; \ pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED,&_old); \ pthread_cleanup_push(q_sempost,q); \ - pthread_cleanup_push(q_release,q) \ - pthread_cleanup_push(q_decrement, cnt) \ + pthread_cleanup_push(q_release,q); \ + pthread_cleanup_push(q_decrement, cnt); \ pthread_mutex_lock(&((q)->mutex)); \ (*(cnt))++; \ pthread_testcancel() @@ -43,9 +43,9 @@ /* q_unlock() is called when intentionally exiting critical section */ #define q_unlock(cond) \ pthread_testcancel(); \ - pthread_cleanup_pop(1) \ - pthread_cleanup_pop(1) \ - pthread_cleanup_pop(1) \ + pthread_cleanup_pop(1); \ + pthread_cleanup_pop(1); \ + pthread_cleanup_pop(1); \ if(cond) pthread_cond_broadcast(cond); \ pthread_setcanceltype(_old,NULL); } while(0)