diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2010-05-13 12:21:16 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2010-05-13 12:21:16 +0100 |
commit | b4dee233da476f498b6aa6b18e21909d3c8db66d (patch) | |
tree | 7d0e00065d4b45486126c706d4dcb1876fa4ea0b | |
parent | 117f6cf56467f894f85cc5f984dd62c1d290043c (diff) | |
download | xen-b4dee233da476f498b6aa6b18e21909d3c8db66d.tar.gz xen-b4dee233da476f498b6aa6b18e21909d3c8db66d.tar.bz2 xen-b4dee233da476f498b6aa6b18e21909d3c8db66d.zip |
xenstore: Fix cleanup_pop() definition for some (buggy) pthread.h headers.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
-rw-r--r-- | tools/xenstore/xs.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/xenstore/xs.c b/tools/xenstore/xs.c index 53e3d44345..7e3d9c4b63 100644 --- a/tools/xenstore/xs.c +++ b/tools/xenstore/xs.c @@ -85,8 +85,14 @@ struct xs_handle { #define mutex_unlock(m) pthread_mutex_unlock(m) #define condvar_signal(c) pthread_cond_signal(c) #define condvar_wait(c,m,hnd) pthread_cond_wait(c,m) -#define cleanup_push(f, a) pthread_cleanup_push((void (*)(void *))(f), (void *)(a)) -#define cleanup_pop(run) pthread_cleanup_pop(run) +#define cleanup_push(f, a) \ + pthread_cleanup_push((void (*)(void *))(f), (void *)(a)) +/* + * Some definitions of pthread_cleanup_pop() are a macro starting with an + * end-brace. GCC then complains if we immediately precede that with a label. + * Hence we insert a dummy statement to appease the compiler in this situation. + */ +#define cleanup_pop(run) ((void)0); pthread_cleanup_pop(run) static void *read_thread(void *arg); |