krb5 commit: Allow libev to use pthreads on old platforms
Greg Hudson
ghudson at mit.edu
Tue Aug 16 12:05:26 EDT 2016
https://github.com/krb5/krb5/commit/615787708904fd3e472f3be4730cf17c8bba5891
commit 615787708904fd3e472f3be4730cf17c8bba5891
Author: Greg Hudson <ghudson at mit.edu>
Date: Sun Aug 14 19:00:12 2016 -0400
Allow libev to use pthreads on old platforms
The upgrade to libev 4.22 introduced the use of "memory fences" for
more reliable signal processing. Memory fences are usually
implemented using assembly or compiler primitives, but may be
implemented using pthreads as a last resort. The unmodified libev
errors out at compile time if pthreads is used, but notes that this
error can be removed if relying on pthreads is okay. Because the
project's nightly build infrastructure includes an old Solaris machine
whose toolchain is too old for any of the non-pthreads memory fence
implementations, remove the error to allow the build to succeed. (A
dependency on pthreads functions on Solaris does not require linking
with libpthread.)
src/util/verto/ev.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/src/util/verto/ev.c b/src/util/verto/ev.c
index cf55835..87f9067 100644
--- a/src/util/verto/ev.c
+++ b/src/util/verto/ev.c
@@ -1511,8 +1511,15 @@ ecb_binary32_to_binary16 (uint32_t x)
* alternatively, you can remove this #error and link against libpthread,
* which will then provide the memory fences.
*/
+/*
+ * krb5 change: per the comment below, we are allowing pthreads on platforms
+ * which are too old to have better memory thead support, as is the case on
+ * older Solaris versions.
+ */
+#if 0
# error "memory fences not defined for your architecture, please report"
#endif
+#endif
#ifndef ECB_MEMORY_FENCE
# define ECB_MEMORY_FENCE do { } while (0)
More information about the cvs-krb5
mailing list