From 46d8093785e68c244db50eaa97fd52592368d001 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Wed, 5 May 2004 00:47:59 +0000 Subject: [PATCH] * threads.c (k5_key_register, destructors, k5_setspecific) [!ENABLE_THREADS]: Update to fit declarations. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16305 dc483132-0cff-0310-8789-dd5450dbe970 --- src/util/support/ChangeLog | 3 +++ src/util/support/threads.c | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/util/support/ChangeLog b/src/util/support/ChangeLog index a0f29b27a..a8bd1f57d 100644 --- a/src/util/support/ChangeLog +++ b/src/util/support/ChangeLog @@ -7,3 +7,6 @@ * foreachaddr.c: New file, based on include/foreachaddr.c. * libkrb5support.exports: New file. + * threads.c (k5_key_register, destructors, k5_setspecific) + [!ENABLE_THREADS]: Update to fit declarations. + diff --git a/src/util/support/threads.c b/src/util/support/threads.c index 2aede85e5..e8123ee26 100644 --- a/src/util/support/threads.c +++ b/src/util/support/threads.c @@ -190,7 +190,7 @@ int k5_key_delete (k5_key_t keynum) #else -static void (*destructors[K5_KEY_MAX])(void); +static void (*destructors[K5_KEY_MAX])(void *); static void *tsd_values[K5_KEY_MAX]; static unsigned char destructors_set[K5_KEY_MAX]; @@ -199,12 +199,13 @@ int krb5int_thread_support_init(void) return 0; } -int k5_key_register (k5_key_t keynum, void (*d)(void)) +int k5_key_register (k5_key_t keynum, void (*d)(void *)) { assert(keynum >= 0 && keynum < K5_KEY_MAX); assert(destructors_set[keynum] == 0); destructors[keynum] = d; destructors_set[keynum] = 1; + return 0; } void *k5_getspecific (k5_key_t keynum) @@ -214,7 +215,7 @@ void *k5_getspecific (k5_key_t keynum) return tsd_values[keynum]; } -int k5_setspecific (k5_key_t keynum, const void *value) +int k5_setspecific (k5_key_t keynum, void *value) { assert(keynum >= 0 && keynum < K5_KEY_MAX); assert(destructors_set[keynum] == 1); -- 2.26.2