From f560198e4598fe1b1fe471c9f3da2251edf87105 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 16 Apr 2008 20:01:27 +0000 Subject: [PATCH] r15192@tombo: nickm | 2008-04-16 15:59:51 -0400 Fix a compilation error on OSX. svn:r710 --- test/regress_pthread.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/regress_pthread.c b/test/regress_pthread.c index 51b7ee82..6e43ae7c 100644 --- a/test/regress_pthread.c +++ b/test/regress_pthread.c @@ -158,7 +158,13 @@ free_lock(void *lock) static unsigned long get_id(void) { - return (unsigned long)(pthread_self()); + union { + pthread_t thr; + unsigned long id; + } r; + r.id = 0; + r.thr = pthread_self(); + return r.id; } void