[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/release-0.2.4] Give an #error when we want threads and OpenSSL has disabled threads
commit fdafe11a25ad3e7ca8893c8630f86973431217b9
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Mon Mar 11 13:23:10 2013 -0400
Give an #error when we want threads and OpenSSL has disabled threads
Fixes ticket 6673.
---
changes/bug6673 | 4 ++++
src/common/crypto.c | 6 ++++++
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/changes/bug6673 b/changes/bug6673
new file mode 100644
index 0000000..506b449
--- /dev/null
+++ b/changes/bug6673
@@ -0,0 +1,4 @@
+ o Minor features (build):
+ - Detect and reject attempts to build Tor with threading support
+ when OpenSSL have been compiled with threading support disabled.
+ Fixes bug 6673.
diff --git a/src/common/crypto.c b/src/common/crypto.c
index 22d57c7..3d8b1ba 100644
--- a/src/common/crypto.c
+++ b/src/common/crypto.c
@@ -3000,6 +3000,12 @@ memwipe(void *mem, uint8_t byte, size_t sz)
}
#ifdef TOR_IS_MULTITHREADED
+
+#ifndef OPENSSL_THREADS
+#error OpenSSL has been built without thread support. Tor requires an \
+ OpenSSL library with thread support enabled.
+#endif
+
/** Helper: OpenSSL uses this callback to manipulate mutexes. */
static void
openssl_locking_cb_(int mode, int n, const char *file, int line)
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits