mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-18 20:57:56 +00:00
Fix warnings on android ndk
This commit is contained in:
parent
e8effa75e4
commit
cf4306cff2
@ -1290,8 +1290,10 @@ static int netlink_socket()
|
||||
addr.nl_family = AF_NETLINK;
|
||||
addr.nl_groups = RTMGRP_IPV4_IFADDR;
|
||||
|
||||
if (bind(sock, (struct sockaddr *)&addr, sizeof(addr)) == -1)
|
||||
if (bind(sock, (struct sockaddr *)&addr, sizeof(addr)) == -1){
|
||||
close(sock);
|
||||
return WHYF_perror("bind(%d,AF_NETLINK,%lu)", sock, (unsigned long)sizeof(addr));
|
||||
}
|
||||
|
||||
DEBUGF(overlayinterfaces, "bind(%d,AF_NETLINK,%lu)", sock, (unsigned long)sizeof(addr));
|
||||
|
||||
|
2
socket.c
2
socket.c
@ -369,7 +369,7 @@ int socket_resolve_name(int family, const char *name, const char *service, struc
|
||||
|
||||
struct addrinfo *p = addresses;
|
||||
while(p){
|
||||
if (p->ai_addrlen < sizeof(address->raw) && (p->ai_addr->sa_family == AF_INET || p->ai_addr->sa_family == AF_INET6)){
|
||||
if (p->ai_addrlen < (socklen_t)sizeof(address->raw) && (p->ai_addr->sa_family == AF_INET || p->ai_addr->sa_family == AF_INET6)){
|
||||
address->addrlen = p->ai_addrlen;
|
||||
memcpy(&address->addr, p->ai_addr, p->ai_addrlen);
|
||||
ret = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user