Skip to content

Commit f022103

Browse files
authored
Merge pull request kvspb#213 from jcu-eresearch/master
Allow compiling on GCC < 5 / CentOS 6 (see kvspb#138)
2 parents e208153 + 766fe02 commit f022103

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ngx_http_auth_ldap_module.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,11 @@
4141
#pragma clang diagnostic warning "-W#warnings"
4242
#else
4343
#ifdef __GNUC__
44+
#if GNUC > 4
4445
#pragma GCC diagnostic warning "-Wcpp"
4546
#endif
4647
#endif
48+
#endif
4749
// TODO: do the same stuff for MSVC and/or other compilers
4850

4951

@@ -433,7 +435,9 @@ ngx_http_auth_ldap_ldap_server(ngx_conf_t *cf, ngx_command_t *dummy, void *conf)
433435
#if OPENSSL_VERSION_NUMBER >= 0x10002000
434436
server->ssl_check_cert = 1;
435437
#else
438+
#if GNUC > 4
436439
#warning "http_auth_ldap: Compiling with OpenSSL < 1.0.2, certificate verification will be unavailable. OPENSSL_VERSION_NUMBER == " XSTR(OPENSSL_VERSION_NUMBER)
440+
#endif
437441
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
438442
"http_auth_ldap: 'ssl_cert_check': cannot verify remote certificate's domain name because "
439443
"your version of OpenSSL is too old. "

0 commit comments

Comments
 (0)