6ef2cb
Include <openssl/err.h> for the ERR_error_string function.  This
6ef2cb
improves compatibility with future compilers which will not accept
6ef2cb
implicit funcction declarations by default.
6ef2cb
6ef2cb
diff --git a/configure b/configure
6ef2cb
index fe4e606e91010520..694801b2a93659af 100755
6ef2cb
--- a/configure
6ef2cb
+++ b/configure
6ef2cb
@@ -5199,6 +5199,8 @@ else
6ef2cb
       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6ef2cb
 /* end confdefs.h.  */
6ef2cb
 #include <openssl/ssl.h>
6ef2cb
+      #include <openssl/err.h>
6ef2cb
+
6ef2cb
 int
6ef2cb
 main ()
6ef2cb
 {
6ef2cb
diff --git a/configure.ac b/configure.ac
6ef2cb
index 09dbb7a1e8d35c84..abd599c90e3ef0d7 100644
6ef2cb
--- a/configure.ac
6ef2cb
+++ b/configure.ac
6ef2cb
@@ -559,7 +559,9 @@ if test -n "$WITH_OPENSSL" -a "$sc_cv_have_openssl_ssl_h" = 'yes'; then
6ef2cb
       else
6ef2cb
 	LIBS="$LIBS -lssl -lcrypto"
6ef2cb
       fi
6ef2cb
-      AC_TRY_LINK([#include <openssl/ssl.h>],
6ef2cb
+      AC_TRY_LINK([#include <openssl/ssl.h>
6ef2cb
+      #include <openssl/err.h>
6ef2cb
+      ],
6ef2cb
        [SSL_library_init();ERR_error_string()],
6ef2cb
        [sc_cv_have_libssl='yes'],
6ef2cb
        [ LIBS="$LIBS -lcrypto"