]> git.ipfire.org Git - thirdparty/krb5.git/commit
Convert k5-thread macros to functions
authorSarah Day <sarahday@mit.edu>
Mon, 8 Aug 2016 20:40:17 +0000 (16:40 -0400)
committerGreg Hudson <ghudson@mit.edu>
Wed, 24 Aug 2016 17:05:29 +0000 (13:05 -0400)
commit17932091cc0d5981c5a78d389ffa4a5c7b532bd6
tree24014c0efb75ce8baf9e8e30ce2f848b3bbe0e01
parent7b2cb7ed41e48e0fc28f106438f628f30ef86764
Convert k5-thread macros to functions

k5-thread.h has several pthread support calls defined as macros which
conditionally call pthread functions.  If a program is linked with
libkrb5support and uses these macros, and the program isn't compiled
with -fPIC, then it can crash if the pthread functions are linked at
runtime (via LD_PRELOAD, for instance) but not at compile time.
Convert the conditional macros to functions, so that libkrb5support is
responsible for determining whether pthreads is loaded and for calling
the pthreads functions if it is.

[ghudson@mit.edu: clarified commit message, adjusted whitespace]
src/include/k5-thread.h
src/util/support/libkrb5support-fixed.exports
src/util/support/threads.c