From 1867695ee64b8ee4fa4b68a44c5df776f53ffca8 Mon Sep 17 00:00:00 2001 From: pjd Date: Sun, 2 May 2004 17:59:49 +0000 Subject: Fix compiling on 64-bit architectures. --- sbin/ggate/ggatec/ggatec.c | 2 +- sbin/ggate/ggated/ggated.c | 2 +- sbin/ggate/ggatel/ggatel.c | 2 +- sbin/ggate/shared/ggate.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'sbin/ggate') diff --git a/sbin/ggate/ggatec/ggatec.c b/sbin/ggate/ggatec/ggatec.c index e765fb6..2f90a48 100644 --- a/sbin/ggate/ggatec/ggatec.c +++ b/sbin/ggate/ggatec/ggatec.c @@ -254,7 +254,7 @@ once_again: goto done; } if (ggio.gctl_cmd == BIO_READ) { - if (bsize < ggio.gctl_length) { + if (bsize < (size_t)ggio.gctl_length) { ggio.gctl_data = realloc(ggio.gctl_data, ggio.gctl_length); if (ggio.gctl_data != NULL) diff --git a/sbin/ggate/ggated/ggated.c b/sbin/ggate/ggated/ggated.c index 09a06d0..1c20967 100644 --- a/sbin/ggate/ggated/ggated.c +++ b/sbin/ggate/ggated/ggated.c @@ -275,7 +275,7 @@ exports_find(struct sockaddr *s, const char *path) struct export *ex; in_addr_t ip; - ip = htonl(((struct sockaddr_in *)s)->sin_addr.s_addr); + ip = htonl(((struct sockaddr_in *)(void *)s)->sin_addr.s_addr); SLIST_FOREACH(ex, &exports_list, e_next) { if ((ip & ex->e_mask) != ex->e_ip) continue; diff --git a/sbin/ggate/ggatel/ggatel.c b/sbin/ggate/ggatel/ggatel.c index 78b969e..01be38c 100644 --- a/sbin/ggate/ggatel/ggatel.c +++ b/sbin/ggate/ggatel/ggatel.c @@ -123,7 +123,7 @@ once_again: error = 0; switch (ggio.gctl_cmd) { case BIO_READ: - if (ggio.gctl_length > bsize) { + if ((size_t)ggio.gctl_length > bsize) { ggio.gctl_data = realloc(ggio.gctl_data, ggio.gctl_length); if (ggio.gctl_data != NULL) diff --git a/sbin/ggate/shared/ggate.c b/sbin/ggate/shared/ggate.c index 9002b91..51062f7 100644 --- a/sbin/ggate/shared/ggate.c +++ b/sbin/ggate/shared/ggate.c @@ -326,5 +326,5 @@ g_gate_str2ip(const char *str) hp = gethostbyname(str); if (hp == NULL) return (INADDR_NONE); - return (((struct in_addr *)(hp->h_addr))->s_addr); + return (((struct in_addr *)(void *)hp->h_addr)->s_addr); } -- cgit v1.1