This is an automated email from the ASF dual-hosted git repository. michaelo pushed a commit to branch BZ-63671 in repository https://gitbox.apache.org/repos/asf/tomcat-native.git
commit b73ecc11ad6f48d3ee653193b0494f83482af54d Author: Michael Osipov <micha...@apache.org> AuthorDate: Sun Apr 5 23:05:44 2020 +0200 BZ 63671: libtcnative does not compile with OpenSSL < 1.1.0 and APR w/o threading support This solution uses compile time checks to fail the build if APR has not been compiled with threading support. A cleaner approach would be to fail already at configure time with autoconf. But it cannot easily be implemented because it requires compiler discovery, but we never do this because we rely on preconfigured values from APR. --- java/org/apache/tomcat/jni/Library.java | 2 +- native/include/tcn.h | 4 ++-- native/include/tcn_api.h | 4 ++-- xdocs/miscellaneous/changelog.xml | 4 ++++ 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/java/org/apache/tomcat/jni/Library.java b/java/org/apache/tomcat/jni/Library.java index 45956e1..9034e23 100644 --- a/java/org/apache/tomcat/jni/Library.java +++ b/java/org/apache/tomcat/jni/Library.java @@ -249,7 +249,7 @@ public final class Library { aprVersionString() + ")"); } if (!APR_HAS_THREADS) { - throw new UnsatisfiedLinkError("Missing APR_HAS_THREADS"); + throw new UnsatisfiedLinkError("Missing threading support from APR"); } } return initialize(); diff --git a/native/include/tcn.h b/native/include/tcn.h index d54368b..2b2ae59 100644 --- a/native/include/tcn.h +++ b/native/include/tcn.h @@ -27,8 +27,8 @@ #include "apr_ring.h" #include "apr_strings.h" -#ifndef APR_HAS_THREADS -#error "Missing APR_HAS_THREADS support from APR." +#if !APR_HAS_THREADS +#error "Missing threading support from APR." #endif #if defined(DEBUG) || defined(_DEBUG) diff --git a/native/include/tcn_api.h b/native/include/tcn_api.h index 3a8703d..bacde64 100644 --- a/native/include/tcn_api.h +++ b/native/include/tcn_api.h @@ -24,8 +24,8 @@ #include "apr_network_io.h" #include "apr_strings.h" -#ifndef APR_HAS_THREADS -#error "Missing APR_HAS_THREADS support from APR." +#if !APR_HAS_THREADS +#error "Missing threading support from APR." #endif #include <jni.h> diff --git a/xdocs/miscellaneous/changelog.xml b/xdocs/miscellaneous/changelog.xml index 12b961e..6321079 100644 --- a/xdocs/miscellaneous/changelog.xml +++ b/xdocs/miscellaneous/changelog.xml @@ -37,6 +37,10 @@ <section name="Changes in 1.2.24"> <changelog> <fix> + <bug>63671<bug>: libtcnative does not compile with OpenSSL < 1.1.0 + and APR w/o threading support. (michaelo) + </fix> + <fix> Correct configure message for OpenSSL libdir. (michaelo) </fix> <update> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org