diff options
author | Ruslan Ermilov <ru@nginx.com> | 2017-09-25 15:19:24 +0300 |
---|---|---|
committer | Ruslan Ermilov <ru@nginx.com> | 2017-09-25 15:19:24 +0300 |
commit | 316a34951ab3a2528a97cde1b0a5d095480152a5 (patch) | |
tree | d7ce2fb93f8c6e764cc66517a341b01fe95bd894 /src/core/ngx_inet.h | |
parent | e7738ce82d1836440fafa9d20dde6c9a28d4ecf4 (diff) | |
download | nginx-316a34951ab3a2528a97cde1b0a5d095480152a5.tar.gz nginx-316a34951ab3a2528a97cde1b0a5d095480152a5.zip |
Fixed the NGX_UNIX_ADDRSTRLEN macro.
Diffstat (limited to 'src/core/ngx_inet.h')
-rw-r--r-- | src/core/ngx_inet.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/ngx_inet.h b/src/core/ngx_inet.h index 538771e11..a3b392ee7 100644 --- a/src/core/ngx_inet.h +++ b/src/core/ngx_inet.h @@ -17,10 +17,11 @@ #define NGX_INET6_ADDRSTRLEN \ (sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255") - 1) #define NGX_UNIX_ADDRSTRLEN \ - (sizeof(struct sockaddr_un) - offsetof(struct sockaddr_un, sun_path)) + (sizeof("unix:") - 1 + \ + sizeof(struct sockaddr_un) - offsetof(struct sockaddr_un, sun_path)) #if (NGX_HAVE_UNIX_DOMAIN) -#define NGX_SOCKADDR_STRLEN (sizeof("unix:") - 1 + NGX_UNIX_ADDRSTRLEN) +#define NGX_SOCKADDR_STRLEN NGX_UNIX_ADDRSTRLEN #elif (NGX_HAVE_INET6) #define NGX_SOCKADDR_STRLEN (NGX_INET6_ADDRSTRLEN + sizeof("[]:65535") - 1) #else |