From 4e4f93d364e33bb46e271f3b960a2cf5f38f402e Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 3 Jan 2019 09:50:54 -0500 Subject: [PATCH] Add a #ifdef HAVE_UNISTD_H check to buffers.c Reported on tor-dev by Gisle Vanem. Bug not in any released Tor (The suggested patch used _MSC_VER, but that's not how we do stuff with autoconf. With autoconf, you detect the feature you want, rather than trying to list all the systems that do or do not have it.) --- src/lib/net/buffers_net.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/net/buffers_net.c b/src/lib/net/buffers_net.c index 576dc56a52..a4c0aca3b5 100644 --- a/src/lib/net/buffers_net.c +++ b/src/lib/net/buffers_net.c @@ -21,7 +21,10 @@ #endif #include + +#ifdef HAVE_UNISTD_H #include +#endif #ifdef PARANOIA /** Helper: If PARANOIA is defined, assert that the buffer in local variable