Merge pull request #108 from JoakimSoderberg/minor_issues

Fix compilation for older OpenSSL versions.
This commit is contained in:
Nick Mathewson 2014-10-09 10:42:20 -04:00
commit 163df09b2c
2 changed files with 3 additions and 0 deletions

View File

@ -48,6 +48,7 @@ option(EVENT__DISABLE_OPENSSL "Define if libevent should build without support f
option(EVENT__DISABLE_BENCHMARK "Defines if libevent should build without the benchmark exectuables" OFF)
option(EVENT__DISABLE_TESTS "If tests should be compiled or not" OFF)
option(EVENT__DISABLE_REGRESS "Disable the regress tests" OFF)
option(EVENT__DISABLE_SAMPLES "Disable sample files" OFF)
option(EVENT__FORCE_KQUEUE_CHECK "When crosscompiling forces running a test program that verifies that Kqueue works with pipes. Note that this requires you to manually run the test program on the the cross compilation target to verify that it works. See cmake documentation for try_run for more details" OFF)
option(EVENT__COVERAGE "Enable running gcov to get a test coverage report (only works with GCC/CLang). Make sure to enable -DCMAKE_BUILD_TYPE=Debug as well." OFF)
# TODO: Add --disable-largefile omit support for large files

View File

@ -346,8 +346,10 @@ main(int argc, char **argv)
die_openssl("SSL_new()");
}
#ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
// Set hostname for SNI extension
SSL_set_tlsext_host_name(ssl, host);
#endif
if (strcasecmp(scheme, "http") == 0) {
bev = bufferevent_socket_new(base, -1, BEV_OPT_CLOSE_ON_FREE);