aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rdate.c2
-rw-r--r--util-linux/rdate.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/rdate.c b/rdate.c
index 0668d302a..20536d24b 100644
--- a/rdate.c
+++ b/rdate.c
@@ -63,7 +63,7 @@ time_t askremotedate(char *host)
sin.sin_port= tserv->s_port;
sin.sin_family = AF_INET;
- if (connect(fd, &sin, sizeof(sin)) < 0) { /* connect to time server */
+ if (connect(fd, (struct sockaddr *)&sin, sizeof(sin)) < 0) { /* connect to time server */
errorMsg("%s: %s\n", host, strerror(errno));
close(fd);
return(-1);
diff --git a/util-linux/rdate.c b/util-linux/rdate.c
index 0668d302a..20536d24b 100644
--- a/util-linux/rdate.c
+++ b/util-linux/rdate.c
@@ -63,7 +63,7 @@ time_t askremotedate(char *host)
sin.sin_port= tserv->s_port;
sin.sin_family = AF_INET;
- if (connect(fd, &sin, sizeof(sin)) < 0) { /* connect to time server */
+ if (connect(fd, (struct sockaddr *)&sin, sizeof(sin)) < 0) { /* connect to time server */
errorMsg("%s: %s\n", host, strerror(errno));
close(fd);
return(-1);