diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2010-05-13 12:22:15 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2010-05-13 12:22:15 +0100 |
commit | 483ad1798e3d88a42029fffa56e0e6fba46252bb (patch) | |
tree | 62a2130cbabe1c123abdd31490540a5828db4aff | |
parent | 03807d42eeb84505d25b10c3daeadd3cf29a8636 (diff) | |
download | xen-483ad1798e3d88a42029fffa56e0e6fba46252bb.tar.gz xen-483ad1798e3d88a42029fffa56e0e6fba46252bb.tar.bz2 xen-483ad1798e3d88a42029fffa56e0e6fba46252bb.zip |
xenstore: Fix cleanup_pop() definition for some (buggy) pthread.h headers.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset: 21374:9d53864d7be6
xen-unstable date: Thu May 13 12:21:16 2010 +0100
-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 3e8d0e2bea..58c6f93574 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); |