Browse Source

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.)
Nick Mathewson 6 years ago
parent
commit
4e4f93d364
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/lib/net/buffers_net.c

+ 3 - 0
src/lib/net/buffers_net.c

@@ -21,7 +21,10 @@
 #endif
 
 #include <stdlib.h>
+
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 
 #ifdef PARANOIA
 /** Helper: If PARANOIA is defined, assert that the buffer in local variable