Why weak referencing pthread_equal() in k5-thread.h?

KAMADA Ken'ichi kamada at nanohz.org
Mon Apr 11 22:27:53 EDT 2005


Hi, this is not (yet :-) a fix request but just a question.

Why pthread_*() other than pthread_once() and
pthread_mutexattr_setrobust_np() are weakly referenced in k5-thread.h?
I see pthread_once() and pthread_mutexattr_setrobust_np() are used to
check whether the libpthread is loaded in the K5_PTHREAD_LOADED macro,
but I don't see why other functions need to be weakly referenced.


Background:

MIT krb5-1.4 (and current on Apr 6) doesn't work on NetBSD
(unless the calling program is linked with libpthread).

NetBSD's libc doesn't have a stub for pthread_equal(), but
MIT krb5 is weakly referencing pthread_equal().
Therefore the absense of pthread_equal() is not detected on the
link-time, and programs using krb5 mysteriously dies at run-time.

# BTW, I'll ask NetBSD to add pthread_equal stub.

Thanks,
-- 
KAMADA Ken'ichi <kamada at nanohz.org>


More information about the krbdev mailing list