diff options
author | Andreas Steffen <andreas.steffen@strongswan.org> | 2006-11-01 10:57:08 +0000 |
---|---|---|
committer | Andreas Steffen <andreas.steffen@strongswan.org> | 2006-11-01 10:57:08 +0000 |
commit | 1ab9441c48509588c1a90ee5f80f37035a24ce2e (patch) | |
tree | 8107a40d99a1d62872bb0758e1248b1b8d2f3ec3 | |
parent | ccd6120387e83920ed35f90150346eb50abc36b4 (diff) | |
download | strongswan-1ab9441c48509588c1a90ee5f80f37035a24ce2e.tar.bz2 strongswan-1ab9441c48509588c1a90ee5f80f37035a24ce2e.tar.xz |
fixed 64 bit issue
-rw-r--r-- | src/charon/bus/bus.c | 7 |
1 files 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 |