summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorBrent Cook <bcook@cvs.openbsd.org>2015-11-23 01:23:57 +0000
committerBrent Cook <bcook@cvs.openbsd.org>2015-11-23 01:23:57 +0000
commit30f41c500bdb65360a288ce425e8b5aa9fac8e9d (patch)
tree1c1f1d5ae8932ed88de1516aee4f0694a1248b6a /usr.bin
parent14057f442d3e46e31df3514c110499414a7c9c5a (diff)
rename variable 'sun' to allow building on Solaris
ok deraadt@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/nc/netcat.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/usr.bin/nc/netcat.c b/usr.bin/nc/netcat.c
index ae2404bd0df..4c3ed4e97f0 100644
--- a/usr.bin/nc/netcat.c
+++ b/usr.bin/nc/netcat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: netcat.c,v 1.143 2015/11/13 18:13:13 deraadt Exp $ */
+/* $OpenBSD: netcat.c,v 1.144 2015/11/23 01:23:56 bcook Exp $ */
/*
* Copyright (c) 2001 Eric Jackson <ericj@monkey.org>
* Copyright (c) 2015 Bob Beck. All rights reserved.
@@ -643,7 +643,7 @@ main(int argc, char *argv[])
int
unix_bind(char *path, int flags)
{
- struct sockaddr_un sun;
+ struct sockaddr_un s_un;
int s;
/* Create unix domain socket. */
@@ -651,17 +651,17 @@ unix_bind(char *path, int flags)
0)) < 0)
return (-1);
- memset(&sun, 0, sizeof(struct sockaddr_un));
- sun.sun_family = AF_UNIX;
+ memset(&s_un, 0, sizeof(struct sockaddr_un));
+ s_un.sun_family = AF_UNIX;
- if (strlcpy(sun.sun_path, path, sizeof(sun.sun_path)) >=
- sizeof(sun.sun_path)) {
+ if (strlcpy(s_un.sun_path, path, sizeof(s_un.sun_path)) >=
+ sizeof(s_un.sun_path)) {
close(s);
errno = ENAMETOOLONG;
return (-1);
}
- if (bind(s, (struct sockaddr *)&sun, sizeof(sun)) < 0) {
+ if (bind(s, (struct sockaddr *)&s_un, sizeof(s_un)) < 0) {
close(s);
return (-1);
}
@@ -737,7 +737,7 @@ tls_setup_server(struct tls *tls_ctx, int connfd, char *host)
int
unix_connect(char *path)
{
- struct sockaddr_un sun;
+ struct sockaddr_un s_un;
int s;
if (uflag) {
@@ -748,16 +748,16 @@ unix_connect(char *path)
return (-1);
}
- memset(&sun, 0, sizeof(struct sockaddr_un));
- sun.sun_family = AF_UNIX;
+ memset(&s_un, 0, sizeof(struct sockaddr_un));
+ s_un.sun_family = AF_UNIX;
- if (strlcpy(sun.sun_path, path, sizeof(sun.sun_path)) >=
- sizeof(sun.sun_path)) {
+ if (strlcpy(s_un.sun_path, path, sizeof(s_un.sun_path)) >=
+ sizeof(s_un.sun_path)) {
close(s);
errno = ENAMETOOLONG;
return (-1);
}
- if (connect(s, (struct sockaddr *)&sun, sizeof(sun)) < 0) {
+ if (connect(s, (struct sockaddr *)&s_un, sizeof(s_un)) < 0) {
close(s);
return (-1);
}