diff options
author | Toomas Soome <tsoome@me.com> | 2018-11-27 09:59:55 +0200 |
---|---|---|
committer | Toomas Soome <tsoome@me.com> | 2019-12-27 16:56:35 +0200 |
commit | 2c961aef81d7897b809d5e7c1c8a2e2c81495125 (patch) | |
tree | c6ceab75c1f3a90f00b1cc387f439f8e6f69c774 /usr/src/lib/libadutils/common/adutils_threadfuncs.c | |
parent | efc1649758e28daa4ec68b64786909347dbe528a (diff) | |
download | illumos-joyent-2c961aef81d7897b809d5e7c1c8a2e2c81495125.tar.gz |
12100 libadutils: cast between incompatible function types
Reviewed by: Andy Fiddaman <andy@omniosce.org>
Reviewed by: C Fraire <cfraire@me.com>
Reviewed by: Matthias Scheler <mscheler@tintri.com>
Approved by: Robert Mustacchi <rm@fingolfin.org>
Diffstat (limited to 'usr/src/lib/libadutils/common/adutils_threadfuncs.c')
-rw-r--r-- | usr/src/lib/libadutils/common/adutils_threadfuncs.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/usr/src/lib/libadutils/common/adutils_threadfuncs.c b/usr/src/lib/libadutils/common/adutils_threadfuncs.c index 21b2d87b03..c86a6f5f90 100644 --- a/usr/src/lib/libadutils/common/adutils_threadfuncs.c +++ b/usr/src/lib/libadutils/common/adutils_threadfuncs.c @@ -46,6 +46,7 @@ struct adutils_lderrno { char *le_errmsg; }; +static void *adutils_threadid(void); static void *adutils_mutex_alloc(void); static void adutils_mutex_free(void *mutexp); static int adutils_get_errno(void); @@ -70,10 +71,9 @@ static struct ldap_thread_fns thread_fns = { }; struct ldap_extra_thread_fns extra_thread_fns = { - .ltf_threadid_fn = (void * (*)(void))pthread_self + .ltf_threadid_fn = adutils_threadid }; - /* * Set up thread management functions for the specified LDAP session. * Returns either LDAP_SUCCESS or -1. @@ -112,6 +112,12 @@ adutils_set_thread_functions(LDAP *ld) return (rc); } +static void * +adutils_threadid(void) +{ + return ((void *)(uintptr_t)pthread_self()); +} + /* * Allocate a mutex. */ |