diff options
author | Tobias Heider <tobhe@cvs.openbsd.org> | 2022-12-04 11:54:32 +0000 |
---|---|---|
committer | Tobias Heider <tobhe@cvs.openbsd.org> | 2022-12-04 11:54:32 +0000 |
commit | 6db5eb96ea53ae5d57b7b24378ac6268fbdbdc9e (patch) | |
tree | d76029b7b575f38a7ee336a5c4c3ef961cf06ab3 /sbin | |
parent | a38290a91db4efcac213e307b17974ce332ce807 (diff) |
Rename sun to s_un for portability.
ok patrick@
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/iked/control.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sbin/iked/control.c b/sbin/iked/control.c index f88b9bf806c..b76a545c5fb 100644 --- a/sbin/iked/control.c +++ b/sbin/iked/control.c @@ -1,4 +1,4 @@ -/* $OpenBSD: control.c,v 1.33 2022/09/19 20:54:02 tobhe Exp $ */ +/* $OpenBSD: control.c,v 1.34 2022/12/04 11:54:31 tobhe Exp $ */ /* * Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org> @@ -77,7 +77,7 @@ int control_init(struct privsep *ps, struct control_sock *cs) { struct iked *env = ps->ps_env; - struct sockaddr_un sun; + struct sockaddr_un s_un; int fd; mode_t old_umask, mode; @@ -89,9 +89,9 @@ control_init(struct privsep *ps, struct control_sock *cs) return (-1); } - sun.sun_family = AF_UNIX; - if (strlcpy(sun.sun_path, cs->cs_name, - sizeof(sun.sun_path)) >= sizeof(sun.sun_path)) { + s_un.sun_family = AF_UNIX; + if (strlcpy(s_un.sun_path, cs->cs_name, + sizeof(s_un.sun_path)) >= sizeof(s_un.sun_path)) { log_warn("%s: %s name too long", __func__, cs->cs_name); close(fd); return (-1); @@ -112,7 +112,7 @@ control_init(struct privsep *ps, struct control_sock *cs) mode = S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP; } - if (bind(fd, (struct sockaddr *)&sun, sizeof(sun)) == -1) { + if (bind(fd, (struct sockaddr *)&s_un, sizeof(s_un)) == -1) { log_warn("%s: bind: %s", __func__, cs->cs_name); close(fd); (void)umask(old_umask); @@ -159,16 +159,16 @@ control_accept(int listenfd, short event, void *arg) struct control_sock *cs = arg; int connfd; socklen_t len; - struct sockaddr_un sun; + struct sockaddr_un s_un; struct ctl_conn *c; event_add(&cs->cs_ev, NULL); if ((event & EV_TIMEOUT)) return; - len = sizeof(sun); + len = sizeof(s_un); if ((connfd = accept4(listenfd, - (struct sockaddr *)&sun, &len, SOCK_NONBLOCK)) == -1) { + (struct sockaddr *)&s_un, &len, SOCK_NONBLOCK)) == -1) { /* * Pause accept if we are out of file descriptors, or * libevent will haunt us here too. |