nginx

changeset 5200:9d83ec073c51

Fixed build with --with-mail_ssl_module. If nginx was compiled without --with-http_ssl_module, but with some other module which uses OpenSSL (e.g. --with-mail_ssl_module), insufficient preprocessor check resulted in build failure. The problem was introduced by e0a3714a36f8 (1.3.14). Reported by Roman Arutyunyan.
author Maxim Dounin <mdounin@mdounin.ru>
date Sat, 11 May 2013 18:49:30 +0400
parents 3494f14aa46a
children 06fbbde04098
files src/http/ngx_http.h src/http/ngx_http_request.c src/http/ngx_http_request.h
diffstat 3 files changed, 6 insertions(+), 6 deletions(-) [+]
line diff
     1.1 --- a/src/http/ngx_http.h	Sat May 11 18:49:19 2013 +0400
     1.2 +++ b/src/http/ngx_http.h	Sat May 11 18:49:30 2013 +0400
     1.3 @@ -89,7 +89,7 @@
     1.4  void ngx_http_init_connection(ngx_connection_t *c);
     1.5  void ngx_http_close_connection(ngx_connection_t *c);
     1.6  
     1.7 -#ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
     1.8 +#if (NGX_HTTP_SSL && defined SSL_CTRL_SET_TLSEXT_HOSTNAME)
     1.9  int ngx_http_ssl_servername(ngx_ssl_conn_t *ssl_conn, int *ad, void *arg);
    1.10  #endif
    1.11  
     2.1 --- a/src/http/ngx_http_request.c	Sat May 11 18:49:19 2013 +0400
     2.2 +++ b/src/http/ngx_http_request.c	Sat May 11 18:49:30 2013 +0400
     2.3 @@ -1955,7 +1955,7 @@
     2.4  
     2.5      hc = r->http_connection;
     2.6  
     2.7 -#ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
     2.8 +#if (NGX_HTTP_SSL && defined SSL_CTRL_SET_TLSEXT_HOSTNAME)
     2.9  
    2.10      if (hc->ssl_servername) {
    2.11          if (hc->ssl_servername->len == host->len
    2.12 @@ -1986,7 +1986,7 @@
    2.13          return NGX_ERROR;
    2.14      }
    2.15  
    2.16 -#ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
    2.17 +#if (NGX_HTTP_SSL && defined SSL_CTRL_SET_TLSEXT_HOSTNAME)
    2.18  
    2.19      if (hc->ssl_servername) {
    2.20          ngx_http_ssl_srv_conf_t  *sscf;
    2.21 @@ -2053,7 +2053,7 @@
    2.22  
    2.23          sn = virtual_names->regex;
    2.24  
    2.25 -#ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
    2.26 +#if (NGX_HTTP_SSL && defined SSL_CTRL_SET_TLSEXT_HOSTNAME)
    2.27  
    2.28          if (r == NULL) {
    2.29              ngx_http_connection_t  *hc;
    2.30 @@ -2085,7 +2085,7 @@
    2.31              return NGX_DECLINED;
    2.32          }
    2.33  
    2.34 -#endif /* SSL_CTRL_SET_TLSEXT_HOSTNAME */
    2.35 +#endif /* NGX_HTTP_SSL && defined SSL_CTRL_SET_TLSEXT_HOSTNAME */
    2.36  
    2.37          for (i = 0; i < virtual_names->nregex; i++) {
    2.38  
     3.1 --- a/src/http/ngx_http_request.h	Sat May 11 18:49:19 2013 +0400
     3.2 +++ b/src/http/ngx_http_request.h	Sat May 11 18:49:30 2013 +0400
     3.3 @@ -295,7 +295,7 @@
     3.4      ngx_http_addr_conf_t             *addr_conf;
     3.5      ngx_http_conf_ctx_t              *conf_ctx;
     3.6  
     3.7 -#ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
     3.8 +#if (NGX_HTTP_SSL && defined SSL_CTRL_SET_TLSEXT_HOSTNAME)
     3.9      ngx_str_t                        *ssl_servername;
    3.10  #if (NGX_PCRE)
    3.11      ngx_http_regex_t                 *ssl_servername_regex;