diff options
author | David Goulet <dgoulet@torproject.org> | 2017-02-08 08:56:39 -0500 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2017-02-08 09:00:48 -0500 |
commit | e129393e40ae291b825d41946580d8a4cf63a61d (patch) | |
tree | a08baf1c6d14fc4ea43538d010f59bf74a00e843 /src | |
parent | 9a9f4ffdfa965e50de05a4f1bd8c4d68cfb95f12 (diff) | |
download | tor-e129393e40ae291b825d41946580d8a4cf63a61d.tar.gz tor-e129393e40ae291b825d41946580d8a4cf63a61d.zip |
test: Add missing socket errno in test_util.c
According to 21116, it seems to be needed for Wheezy Raspbian build. Also,
manpage of socket(2) does confirm that this errno value should be catched as
well in case of no support from the OS of IPv4 or/and IPv6.
Fixes #21116
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/test/test_util.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/test_util.c b/src/test/test_util.c index fafb84f4fe..c317e724cc 100644 --- a/src/test/test_util.c +++ b/src/test/test_util.c @@ -5091,7 +5091,8 @@ test_util_socket(void *arg) fd1 = tor_open_socket_with_extensions(domain, SOCK_STREAM, 0, 0, 0); int err = tor_socket_errno(fd1); - if (fd1 < 0 && err == SOCK_ERRNO(EPROTONOSUPPORT)) { + if (fd1 < 0 && (err == SOCK_ERRNO(EPROTONOSUPPORT) || + err == SOCK_ERRNO(EAFNOSUPPORT))) { /* Assume we're on an IPv4-only or IPv6-only system, and give up now. */ goto done; } |