[openssh-commits] [openssh] 01/02: upstream: Rename sockaddr_un sun -> sunaddr.

git+noreply at mindrot.org git+noreply at mindrot.org
Wed May 7 21:06:23 AEST 2025


This is an automated email from the git hooks/post-receive script.

dtucker pushed a commit to branch master
in repository openssh.

commit 207289a5663bdf49903e1aeb938dcc0924e2ac63
Author: dtucker at openbsd.org <dtucker at openbsd.org>
AuthorDate: Wed May 7 10:44:26 2025 +0000

    upstream: Rename sockaddr_un sun -> sunaddr.
    
    This makes things easier in -portable, where on Solaris an derivatives
    "sun" is defined to "1", causing compilation errors.  ok deraadt at .
    
    OpenBSD-Commit-ID: 0669043afb49856b57b382f0489221bd98305d3b
---
 misc-agent.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/misc-agent.c b/misc-agent.c
index 9d96880e9..34ce2a524 100644
--- a/misc-agent.c
+++ b/misc-agent.c
@@ -226,14 +226,14 @@ static int
 socket_is_stale(const char *path)
 {
 	int fd, r;
-	struct sockaddr_un sun;
+	struct sockaddr_un sunaddr;
 	socklen_t l = sizeof(r);
 
 	/* attempt non-blocking connect on socket */
-	memset(&sun, '\0', sizeof(sun));
-	sun.sun_family = AF_UNIX;
-	if (strlcpy(sun.sun_path, path,
-	    sizeof(sun.sun_path)) >= sizeof(sun.sun_path)) {
+	memset(&sunaddr, '\0', sizeof(sunaddr));
+	sunaddr.sun_family = AF_UNIX;
+	if (strlcpy(sunaddr.sun_path, path,
+	    sizeof(sunaddr.sun_path)) >= sizeof(sunaddr.sun_path)) {
 		debug_f("path for \"%s\" too long for sockaddr_un", path);
 		return 0;
 	}
@@ -243,7 +243,7 @@ socket_is_stale(const char *path)
 	}
 	set_nonblock(fd);
 	/* a socket without a listener should yield an error immediately */
-	if (connect(fd, (struct sockaddr *)&sun, sizeof(sun)) == -1) {
+	if (connect(fd, (struct sockaddr *)&sunaddr, sizeof(sunaddr)) == -1) {
 		debug_f("connect \"%s\": %s", path, strerror(errno));
 		close(fd);
 		return 1;

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list