Commit 4e4f93d3 authored by Nick Mathewson's avatar Nick Mathewson 🦀
Browse files

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.)
parent 9ba690e3
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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