summaryrefslogtreecommitdiffabout
path: root/gacopyz/gacopyz.c
Side-by-side diff
Diffstat (limited to 'gacopyz/gacopyz.c') (more/less context) (ignore whitespace changes)
-rw-r--r--gacopyz/gacopyz.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/gacopyz/gacopyz.c b/gacopyz/gacopyz.c
index 1fff7ed..24f694e 100644
--- a/gacopyz/gacopyz.c
+++ b/gacopyz/gacopyz.c
@@ -152,8 +152,8 @@ do_connect(gacopyz_conn_t conn,
{
union {
struct sockaddr sa;
- struct sockaddr_in sin;
- struct sockaddr_un sun;
+ struct sockaddr_in s_in;
+ struct sockaddr_un s_un;
} addr;
int socklen;
int fd, flags;
@@ -171,7 +171,7 @@ do_connect(gacopyz_conn_t conn,
return -1;
}
- if (strlen(path) > sizeof addr.sun.sun_path) {
+ if (strlen(path) > sizeof addr.s_un.sun_path) {
errno = EINVAL;
gacopyz_log(conn, SMI_LOG_ERR,
_("%s: %s: UNIX socket name too long"),
@@ -180,8 +180,8 @@ do_connect(gacopyz_conn_t conn,
}
addr.sa.sa_family = PF_UNIX;
- socklen = sizeof(addr.sun);
- strcpy(addr.sun.sun_path, path);
+ socklen = sizeof(addr.s_un);
+ strcpy(addr.s_un.sun_path, path);
if (stat(path, &st)) {
if (errno == ENOENT) {
@@ -217,7 +217,7 @@ do_connect(gacopyz_conn_t conn,
char *p;
addr.sa.sa_family = PF_INET;
- socklen = sizeof(addr.sin);
+ socklen = sizeof(addr.s_in);
if (!port) {
gacopyz_log(conn, SMI_LOG_ERR,
@@ -250,7 +250,7 @@ do_connect(gacopyz_conn_t conn,
}
if (!path)
- addr.sin.sin_addr.s_addr = INADDR_ANY;
+ addr.s_in.sin_addr.s_addr = INADDR_ANY;
else {
struct hostent *hp = gethostbyname(path);
if (!hp) {
@@ -262,8 +262,8 @@ do_connect(gacopyz_conn_t conn,
addr.sa.sa_family = hp->h_addrtype;
switch (hp->h_addrtype) {
case AF_INET:
- memmove(&addr.sin.sin_addr, hp->h_addr, 4);
- addr.sin.sin_port = pnum;
+ memmove(&addr.s_in.sin_addr, hp->h_addr, 4);
+ addr.s_in.sin_port = pnum;
break;
default:

Return to:

Send suggestions and report system problems to the System administrator.