diff options
| author | Garrett D'Amore <garrett@damore.org> | 2020-01-12 23:29:10 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2020-01-12 23:30:33 -0800 |
| commit | b74e76c1a751274b962f81d7169742de735b1bec (patch) | |
| tree | acac52fd0b723bbe16b27f10cb1d5e757f709b09 | |
| parent | 476422544755e1d2e44fed6be024a74a35a56fed (diff) | |
| download | nng-1.2.4.tar.gz nng-1.2.4.tar.bz2 nng-1.2.4.zip | |
fixes #1131 (openindiana) compile errorv1.2.4
| -rw-r--r-- | src/platform/posix/posix_ipclisten.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/platform/posix/posix_ipclisten.c b/src/platform/posix/posix_ipclisten.c index da3eab7b..6d3ab2e1 100644 --- a/src/platform/posix/posix_ipclisten.c +++ b/src/platform/posix/posix_ipclisten.c @@ -183,13 +183,13 @@ static int ipc_remove_stale(const char *path) { int fd; - struct sockaddr_un sun; + struct sockaddr_un sa; size_t sz; - sun.sun_family = AF_UNIX; - sz = sizeof(sun.sun_path); + sa.sun_family = AF_UNIX; + sz = sizeof(sa.sun_path); - if (nni_strlcpy(sun.sun_path, path, sz) >= sz) { + if (nni_strlcpy(sa.sun_path, path, sz) >= sz) { return (NNG_EADDRINVAL); } @@ -203,7 +203,7 @@ ipc_remove_stale(const char *path) // then the cleanup will fail. As this is supposed to be an // exceptional case, don't worry. (void) fcntl(fd, F_SETFL, O_NONBLOCK); - if (connect(fd, (void *) &sun, sizeof(sun)) < 0) { + if (connect(fd, (void *) &sa, sizeof(sa)) < 0) { if (errno == ECONNREFUSED) { (void) unlink(path); } |
