From b6dd6703adb311a5635bb4914dbaa8dbb846569a Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 12 Jan 2020 23:29:10 -0800 Subject: fixes #1131 (openindiana) compile error --- src/platform/posix/posix_ipclisten.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/platform/posix/posix_ipclisten.c b/src/platform/posix/posix_ipclisten.c index 4104be99..43febcfb 100644 --- a/src/platform/posix/posix_ipclisten.c +++ b/src/platform/posix/posix_ipclisten.c @@ -185,13 +185,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); } @@ -205,7 +205,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); } -- cgit v1.2.3-70-g09d2