Skip to content
Snippets Groups Projects
Commit f987c966 authored by Michael Tüxen's avatar Michael Tüxen
Browse files

Improve compilation on non Linux platforms.

parent 7b64e0e7
No related branches found
No related tags found
No related merge requests found
...@@ -168,7 +168,7 @@ static void ipv4_to_sockaddr(const struct ip_address *ipv4, u16 port, ...@@ -168,7 +168,7 @@ static void ipv4_to_sockaddr(const struct ip_address *ipv4, u16 port,
{ {
struct sockaddr_in sa_v4; struct sockaddr_in sa_v4;
memset(&sa_v4, 0, sizeof(sa_v4)); memset(&sa_v4, 0, sizeof(sa_v4));
#ifndef linux #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__)
sa_v4.sin_len = sizeof(sa_v4); sa_v4.sin_len = sizeof(sa_v4);
#endif #endif
sa_v4.sin_family = AF_INET; sa_v4.sin_family = AF_INET;
...@@ -186,7 +186,7 @@ static void ipv6_to_sockaddr(const struct ip_address *ipv6, u16 port, ...@@ -186,7 +186,7 @@ static void ipv6_to_sockaddr(const struct ip_address *ipv6, u16 port,
{ {
struct sockaddr_in6 sa_v6; struct sockaddr_in6 sa_v6;
memset(&sa_v6, 0, sizeof(sa_v6)); memset(&sa_v6, 0, sizeof(sa_v6));
#ifndef linux #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__)
sa_v6.sin6_len = sizeof(sa_v6); sa_v6.sin6_len = sizeof(sa_v6);
#endif #endif
sa_v6.sin6_family = AF_INET6; sa_v6.sin6_family = AF_INET6;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment