[nginx] Fixed the NGX_UNIX_ADDRSTRLEN macro.
Ruslan Ermilov
ru at nginx.com
Wed Sep 27 19:36:45 UTC 2017
details: http://hg.nginx.org/nginx/rev/beeac3302e45
branches:
changeset: 7113:beeac3302e45
user: Ruslan Ermilov <ru at nginx.com>
date: Mon Sep 25 15:19:24 2017 +0300
description:
Fixed the NGX_UNIX_ADDRSTRLEN macro.
diffstat:
src/core/ngx_inet.h | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (17 lines):
diff -r 5a3ab1b5804b -r beeac3302e45 src/core/ngx_inet.h
--- a/src/core/ngx_inet.h Fri Sep 22 22:49:42 2017 +0300
+++ b/src/core/ngx_inet.h Mon Sep 25 15:19:24 2017 +0300
@@ -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
More information about the nginx-devel
mailing list