]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
test_util: Do not check for ENETUNREACH unless it exists.
authorNick Mathewson <nickm@torproject.org>
Tue, 6 Aug 2019 15:35:50 +0000 (11:35 -0400)
committerNick Mathewson <nickm@torproject.org>
Tue, 6 Aug 2019 15:35:50 +0000 (11:35 -0400)
Fixes bug 31352; bug not in any released Tor.

src/test/test_util.c

index 41ecbfd3883b8c701641cf7456cea81b3b922065..c56d3488ba6ddf58ef82f50f6a6def2e91d67c81 100644 (file)
@@ -5399,11 +5399,13 @@ test_util_socketpair(void *arg)
     tt_skip();
   }
 #endif /* defined(__FreeBSD__) */
+#ifdef ENETUNREACH
   if (ersatz && socketpair_result == -ENETUNREACH) {
     /* We can also fail with -ENETUNREACH if we have no network stack at
      * all. */
     tt_skip();
   }
+#endif
   tt_int_op(0, OP_EQ, socketpair_result);
 
   tt_assert(SOCKET_OK(fds[0]));