]> git.meshlink.io Git - catta/commitdiff
add a (struct sockaddr*) cast to getsockname
authorLennart Poettering <lennart@poettering.net>
Wed, 12 Oct 2005 20:37:12 +0000 (20:37 +0000)
committerLennart Poettering <lennart@poettering.net>
Wed, 12 Oct 2005 20:37:12 +0000 (20:37 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@743 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-core/server.c

index 9046ec4c842474bd0a4dec3f0d7b92dd6c1922f4..f23ef392e637b0fb602f115c484d52d157e4cd81 100644 (file)
@@ -881,7 +881,7 @@ static int originates_from_local_legacy_unicast_socket(AvahiServer *s, const str
         struct sockaddr_in lsa;
         socklen_t l = sizeof(lsa);
         
-        if (getsockname(s->fd_legacy_unicast_ipv4, &lsa, &l) != 0)
+        if (getsockname(s->fd_legacy_unicast_ipv4, (struct sockaddr*) &lsa, &l) != 0)
             avahi_log_warn("getsockname(): %s", strerror(errno));
         else
             return lsa.sin_port == ((const struct sockaddr_in*) sa)->sin_port;
@@ -892,7 +892,7 @@ static int originates_from_local_legacy_unicast_socket(AvahiServer *s, const str
         struct sockaddr_in6 lsa;
         socklen_t l = sizeof(lsa);
 
-        if (getsockname(s->fd_legacy_unicast_ipv6, &lsa, &l) != 0)
+        if (getsockname(s->fd_legacy_unicast_ipv6, (struct sockaddr*) &lsa, &l) != 0)
             avahi_log_warn("getsockname(): %s", strerror(errno));
         else
             return lsa.sin6_port == ((const struct sockaddr_in6*) sa)->sin6_port;