瀏覽代碼

test_util: Do not check for ENETUNREACH unless it exists.

Fixes bug 31352; bug not in any released Tor.
Nick Mathewson 6 年之前
父節點
當前提交
66437710af
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/test/test_util.c

+ 2 - 0
src/test/test_util.c

@@ -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]));