aboutsummaryrefslogtreecommitdiffhomepage
path: root/unix.c
diff options
context:
space:
mode:
authoreihrul <eihrul>2008-10-06 22:46:10 +0000
committereihrul <eihrul>2008-10-06 22:46:10 +0000
commitad60b6d451ac93e669bfeb72f4c482bb5554609c (patch)
tree43daacdf4a42257ef7c61defcd504a8f74aad94f /unix.c
parentb846c47521bcf2978bf9f6c3a39e0e8a324664be (diff)
downloadenet-ad60b6d451ac93e669bfeb72f4c482bb5554609c.tar.gz
enet-ad60b6d451ac93e669bfeb72f4c482bb5554609c.zip
bind address bug fix
Diffstat (limited to 'unix.c')
-rw-r--r--unix.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/unix.c b/unix.c
index 0bf794f..1ccdc4c 100644
--- a/unix.c
+++ b/unix.c
@@ -159,6 +159,8 @@ enet_socket_bind (ENetSocket socket, const ENetAddress * address)
memset (& sin, 0, sizeof (struct sockaddr_in));
+ sin.sin_family = AF_INET;
+
if (address != NULL)
{
sin.sin_port = ENET_HOST_TO_NET_16 (address -> port);