mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-07 00:50:50 +00:00
Fix compiling on 64-bit architectures.
This commit is contained in:
parent
0d785336d1
commit
86bfa45446
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=128836
|
@ -254,7 +254,7 @@ serve(int sfd)
|
|||
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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -123,7 +123,7 @@ g_gatel_serve(int fd)
|
|||
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)
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue