diff options
author | 2016-01-27 01:20:10 +0000 | |
---|---|---|
committer | 2016-01-27 01:20:10 +0000 | |
commit | 86ecbf1ee3c48d7a406e2f335749d917733f4718 (patch) | |
tree | 60297f1a6778d2d46ec39e15c5137f09fec038e4 /regress/lib/libpthread/restart | |
parent | make the debug messages a bit more useful here (diff) | |
download | wireguard-openbsd-86ecbf1ee3c48d7a406e2f335749d917733f4718.tar.xz wireguard-openbsd-86ecbf1ee3c48d7a406e2f335749d917733f4718.zip |
Properly initialize sin_family.
Diffstat (limited to 'regress/lib/libpthread/restart')
-rw-r--r-- | regress/lib/libpthread/restart/accept/accept.c | 3 | ||||
-rw-r--r-- | regress/lib/libpthread/restart/recvfrom/recvfrom.c | 3 | ||||
-rw-r--r-- | regress/lib/libpthread/restart/recvmsg/recvmsg.c | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/regress/lib/libpthread/restart/accept/accept.c b/regress/lib/libpthread/restart/accept/accept.c index 635b2e2bd42..f314b44b082 100644 --- a/regress/lib/libpthread/restart/accept/accept.c +++ b/regress/lib/libpthread/restart/accept/accept.c @@ -1,4 +1,4 @@ -/* $OpenBSD: accept.c,v 1.1 2011/09/13 23:50:17 fgsch Exp $ */ +/* $OpenBSD: accept.c,v 1.2 2016/01/27 01:20:10 jca Exp $ */ /* * Federico G. Schwindt <fgsch@openbsd.org>, 2011. Public Domain. */ @@ -27,6 +27,7 @@ thr_accept(void *arg) CHECKe(s = socket(AF_INET, SOCK_STREAM, 0)); bzero(&sa, sizeof(sa)); + sa.sin_family = AF_INET; sa.sin_port = htons(6543); CHECKe(bind(s, (const void*)&sa, sizeof(sa))); CHECKe(listen(s, 10)); diff --git a/regress/lib/libpthread/restart/recvfrom/recvfrom.c b/regress/lib/libpthread/restart/recvfrom/recvfrom.c index 7b4f185a27a..9087d41a670 100644 --- a/regress/lib/libpthread/restart/recvfrom/recvfrom.c +++ b/regress/lib/libpthread/restart/recvfrom/recvfrom.c @@ -1,4 +1,4 @@ -/* $OpenBSD: recvfrom.c,v 1.1 2011/09/13 23:50:17 fgsch Exp $ */ +/* $OpenBSD: recvfrom.c,v 1.2 2016/01/27 01:20:10 jca Exp $ */ /* * Federico G. Schwindt <fgsch@openbsd.org>, 2011. Public Domain. */ @@ -28,6 +28,7 @@ thr_recvfrom(void *arg) CHECKe(s = socket(AF_INET, SOCK_DGRAM, 0)); bzero(&sa, sizeof(sa)); + sa.sin_family = AF_INET; sa.sin_port = htons(6543); CHECKe(bind(s, (const void*)&sa, sizeof(sa))); salen = sizeof(sa); diff --git a/regress/lib/libpthread/restart/recvmsg/recvmsg.c b/regress/lib/libpthread/restart/recvmsg/recvmsg.c index e1fd7b64d65..0fcecbf591b 100644 --- a/regress/lib/libpthread/restart/recvmsg/recvmsg.c +++ b/regress/lib/libpthread/restart/recvmsg/recvmsg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: recvmsg.c,v 1.1 2011/09/13 23:50:17 fgsch Exp $ */ +/* $OpenBSD: recvmsg.c,v 1.2 2016/01/27 01:20:10 jca Exp $ */ /* * Federico G. Schwindt <fgsch@openbsd.org>, 2011. Public Domain. */ @@ -30,6 +30,7 @@ thr_recvmsg(void *arg) CHECKe(s = socket(AF_INET, SOCK_DGRAM, 0)); bzero(&sa, sizeof(sa)); + sa.sin_family = AF_INET; sa.sin_port = htons(6543); CHECKe(bind(s, (const void*)&sa, sizeof(sa))); bzero(&msg, sizeof(msg)); |