aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_core_module.h
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-12-22 15:15:45 +0000
committerIgor Sysoev <igor@sysoev.ru>2009-12-22 15:15:45 +0000
commit8c97fa9ae4941e11ed000e2fbcc4de66caa447a3 (patch)
tree36899801203d14b427d2d2832f0af3141ff9a8ce /src/http/ngx_http_core_module.h
parent9cf418ea92d4e65e564b30704f14342881a5b18a (diff)
downloadnginx-8c97fa9ae4941e11ed000e2fbcc4de66caa447a3.tar.gz
nginx-8c97fa9ae4941e11ed000e2fbcc4de66caa447a3.zip
fix building by gcc 4.4 with -O2/3/s:
dereferencing pointer 'sin' does break strict-aliasing rules
Diffstat (limited to 'src/http/ngx_http_core_module.h')
-rw-r--r--src/http/ngx_http_core_module.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/http/ngx_http_core_module.h b/src/http/ngx_http_core_module.h
index c240f252c..9ed490a60 100644
--- a/src/http/ngx_http_core_module.h
+++ b/src/http/ngx_http_core_module.h
@@ -43,7 +43,18 @@ typedef struct ngx_http_core_loc_conf_s ngx_http_core_loc_conf_t;
typedef struct {
- u_char sockaddr[NGX_SOCKADDRLEN];
+ union {
+ struct sockaddr sockaddr;
+ struct sockaddr_in sockaddr_in;
+#if (NGX_HAVE_INET6)
+ struct sockaddr_in6 sockaddr_in6;
+#endif
+#if (NGX_HAVE_UNIX_DOMAIN)
+ struct sockaddr_un sockaddr_un;
+#endif
+ u_char sockaddr_data[NGX_SOCKADDRLEN];
+ } u;
+
socklen_t socklen;
unsigned set:1;