aboutsummaryrefslogtreecommitdiff
path: root/src/util/os_network.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-05-25 21:41:52 +0000
committerChristian Grothoff <christian@grothoff.org>2011-05-25 21:41:52 +0000
commit0d43d44a39a7cee4bc1a84ab5eb36ac8eb05e2a2 (patch)
tree7a274ea3d3591fe59d724ca691fdc976d0175066 /src/util/os_network.c
parent79ae099456caba64b0599b7c6e2b2b86bcc6571f (diff)
downloadgnunet-0d43d44a39a7cee4bc1a84ab5eb36ac8eb05e2a2.tar.gz
gnunet-0d43d44a39a7cee4bc1a84ab5eb36ac8eb05e2a2.zip
set sxn_len on FreeBSD where required
Diffstat (limited to 'src/util/os_network.c')
-rw-r--r--src/util/os_network.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/util/os_network.c b/src/util/os_network.c
index 498f6ac9c..ccf326c05 100644
--- a/src/util/os_network.c
+++ b/src/util/os_network.c
@@ -148,6 +148,9 @@ GNUNET_OS_network_interfaces_list (GNUNET_OS_NetworkInterfaceProcessor proc,
148 free (pszIfName); 148 free (pszIfName);
149 149
150 sa.sin_family = AF_INET; 150 sa.sin_family = AF_INET;
151#if HAVE_SOCKADDR_IN_SIN_LEN
152 sa.sin_len = (u_char) sizeof (struct sockaddr_in);
153#endif
151 sa.sin_addr.S_un.S_addr = dwIP; 154 sa.sin_addr.S_un.S_addr = dwIP;
152 155
153 if (GNUNET_OK != 156 if (GNUNET_OK !=
@@ -256,6 +259,9 @@ GNUNET_OS_network_interfaces_list (GNUNET_OS_NetworkInterfaceProcessor proc,
256 { 259 {
257 memset (&a4, 0, sizeof (a4)); 260 memset (&a4, 0, sizeof (a4));
258 a4.sin_family = AF_INET; 261 a4.sin_family = AF_INET;
262#if HAVE_SOCKADDR_IN_SIN_LEN
263 a4.sin_len = (u_char) sizeof (struct sockaddr_in);
264#endif
259 a4.sin_addr = v4; 265 a4.sin_addr = v4;
260 if (GNUNET_OK != 266 if (GNUNET_OK !=
261 proc (proc_cls, 267 proc (proc_cls,
@@ -270,8 +276,10 @@ GNUNET_OS_network_interfaces_list (GNUNET_OS_NetworkInterfaceProcessor proc,
270 { 276 {
271 memset (&a6, 0, sizeof (a6)); 277 memset (&a6, 0, sizeof (a6));
272 a6.sin6_family = AF_INET6; 278 a6.sin6_family = AF_INET6;
279#if HAVE_SOCKADDR_IN_SIN_LEN
280 a6.sin6_len = (u_char) sizeof (struct sockaddr_in6);
281#endif
273 a6.sin6_addr = v6; 282 a6.sin6_addr = v6;
274 fprintf (stderr, "procing %s\n", addrstr);
275 if (GNUNET_OK != 283 if (GNUNET_OK !=
276 proc (proc_cls, 284 proc (proc_cls,
277 ifc, 285 ifc,