commit 9965b5770949fe2a34477368289cf72a886fb6d2 from: vins via: Omar Polo date: Tue Sep 09 22:45:30 2025 UTC sun -> lsun; part of the unbreaking on solaris from vins@pkgsrc.org; thank you! commit - 243d6421b25f09e5b22445f2378598da6ba5b110 commit + 9965b5770949fe2a34477368289cf72a886fb6d2 blob - d1d426e94792797943f3b3dc0400351c91133ce0 blob + 7d63b62ff946c87f767ad9f4cac595deaf0b0c56 --- control.c +++ control.c @@ -59,7 +59,7 @@ TAILQ_HEAD(ctl_conns, ctl_conn) ctl_conns = TAILQ_HEAD int control_init(char *path) { - struct sockaddr_un sun; + struct sockaddr_un lsun; int fd; mode_t old_umask; @@ -73,9 +73,9 @@ control_init(char *path) return (-1); } - memset(&sun, 0, sizeof(sun)); - sun.sun_family = AF_UNIX; - strlcpy(sun.sun_path, path, sizeof(sun.sun_path)); + memset(&lsun, 0, sizeof(lsun)); + lsun.sun_family = AF_UNIX; + strlcpy(lsun.sun_path, path, sizeof(lsun.sun_path)); if (unlink(path) == -1) if (errno != ENOENT) { @@ -85,7 +85,7 @@ control_init(char *path) } old_umask = umask(S_IXUSR|S_IXGRP|S_IWOTH|S_IROTH|S_IXOTH); - if (bind(fd, (struct sockaddr *)&sun, sizeof(sun)) == -1) { + if (bind(fd, (struct sockaddr *)&lsun, sizeof(lsun)) == -1) { warn("%s: bind: %s", __func__, path); close(fd); umask(old_umask); @@ -121,15 +121,15 @@ control_accept(int listenfd, int event, void *bula) { int connfd; socklen_t len; - struct sockaddr_un sun; + struct sockaddr_un lsun; struct ctl_conn *c; ev_add(control_state.fd, EV_READ, control_accept, NULL); if ((event & EV_TIMEOUT)) return; - len = sizeof(sun); - if ((connfd = accept(listenfd, (struct sockaddr *)&sun, &len)) == -1) { + len = sizeof(lsun); + if ((connfd = accept(listenfd, (struct sockaddr *)&lsun, &len)) == -1) { /* * Pause accept if we are out of file descriptors, or * ev will haunt us here too. blob - 0ce60b67e53601e578a7864d165476ccf52288e8 blob + ddac889878e2ae87e333fc48bfdf80a23bd64fb0 --- telescope.c +++ telescope.c @@ -1034,18 +1034,18 @@ start_child(enum telescope_process p, const char *argv static void send_url(const char *url) { - struct sockaddr_un sun; + struct sockaddr_un lsun; struct imsgbuf ibuf; int ctl_sock; if ((ctl_sock = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) err(1, "socket"); - memset(&sun, 0, sizeof(sun)); - sun.sun_family = AF_UNIX; - strlcpy(sun.sun_path, ctlsock_path, sizeof(sun.sun_path)); + memset(&lsun, 0, sizeof(lsun)); + lsun.sun_family = AF_UNIX; + strlcpy(lsun.sun_path, ctlsock_path, sizeof(lsun.sun_path)); - if (connect(ctl_sock, (struct sockaddr *)&sun, sizeof(sun)) == -1) + if (connect(ctl_sock, (struct sockaddr *)&lsun, sizeof(lsun)) == -1) err(1, "connect: %s", ctlsock_path); if (imsgbuf_init(&ibuf, ctl_sock) == -1)