From 1ab9441c48509588c1a90ee5f80f37035a24ce2e Mon Sep 17 00:00:00 2001 From: Andreas Steffen Date: Wed, 1 Nov 2006 10:57:08 +0000 Subject: [PATCH] fixed 64 bit issue --- src/charon/bus/bus.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/charon/bus/bus.c b/src/charon/bus/bus.c index 183263f06..afed16656 100644 --- a/src/charon/bus/bus.c +++ b/src/charon/bus/bus.c @@ -159,12 +159,13 @@ struct private_bus_t { */ static int get_thread_number(private_bus_t *this) { - static int current_num = 0, stored_num; + static long current_num = 0; + static long stored_num; - stored_num = (int)(intptr_t)pthread_getspecific(this->thread_id); + stored_num = (long)pthread_getspecific(this->thread_id); if (stored_num == 0) { /* first call of current thread */ - pthread_setspecific(this->thread_id, (void*)(intptr_t)++current_num); + pthread_setspecific(this->thread_id, (void*)++current_num); return current_num; } else