commit 4e4f93d364e33bb46e271f3b960a2cf5f38f402e
parent 9ba690e33fd31aef6a2fb6cc5971d1191373f55d
Author: Nick Mathewson <nickm@torproject.org>
Date: Thu, 3 Jan 2019 09:50:54 -0500
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.)
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/lib/net/buffers_net.c b/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