diff src/http/ngx_http_core_module.h @ 6559:adf25b8d0431

Introduced the ngx_sockaddr_t type. It's properly aligned and can hold any supported sockaddr.
author Ruslan Ermilov <ru@nginx.com>
date Mon, 23 May 2016 16:37:20 +0300
parents 6f8254ae61b8
children c90cf79d0e1d
line wrap: on
line diff
--- a/src/http/ngx_http_core_module.h
+++ b/src/http/ngx_http_core_module.h
@@ -58,17 +58,7 @@ typedef struct ngx_http_core_loc_conf_s 
 
 
 typedef struct {
-    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;
-
+    ngx_sockaddr_t             u;
     socklen_t                  socklen;
 
     unsigned                   set:1;