tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

commit f0319fcbde2117098bcef12cc731600fd6a85afe
parent 365179cd16b8ccc0986d7a99db2607a95d0932a9
Author: Nick Mathewson <nickm@torproject.org>
Date:   Thu, 28 Jun 2018 18:19:53 -0400

Merge remote-tracking branch 'catalyst-github/fix-macos-includes'

Diffstat:
Msrc/common/compat.c | 3---
Msrc/lib/process/env.c | 4++++
Msrc/lib/string/compat_string.c | 1+
Msrc/lib/time/compat_time.c | 1+
Msrc/lib/time/tvdiff.c | 3+++
5 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/common/compat.c b/src/common/compat.c @@ -60,9 +60,6 @@ #ifdef HAVE_ARPA_INET_H #include <arpa/inet.h> #endif -#ifdef HAVE_CRT_EXTERNS_H -#include <crt_externs.h> -#endif #ifdef HAVE_SYS_STATVFS_H #include <sys/statvfs.h> #endif diff --git a/src/lib/process/env.c b/src/lib/process/env.c @@ -18,6 +18,10 @@ #endif #include <stdlib.h> #include <string.h> +#ifdef HAVE_CRT_EXTERNS_H +/* For _NSGetEnviron on macOS */ +#include <crt_externs.h> +#endif #ifndef HAVE__NSGETENVIRON #ifndef HAVE_EXTERN_ENVIRON_DECLARED diff --git a/src/lib/string/compat_string.c b/src/lib/string/compat_string.c @@ -15,6 +15,7 @@ #endif #include <stdlib.h> +#include <string.h> /** Helper for tor_strtok_r_impl: Advances cp past all characters in * <b>sep</b>, and returns its new value. */ diff --git a/src/lib/time/compat_time.c b/src/lib/time/compat_time.c @@ -16,6 +16,7 @@ #include "lib/log/torlog.h" #include "lib/log/util_bug.h" #include "lib/intmath/muldiv.h" +#include "lib/intmath/bits.h" #include "lib/fs/winlib.h" #include "lib/wallclock/timeval.h" diff --git a/src/lib/time/tvdiff.c b/src/lib/time/tvdiff.c @@ -11,6 +11,9 @@ #ifdef _WIN32 #include <winsock2.h> #endif +#ifdef HAVE_SYS_TIME_H +#include <sys/time.h> +#endif #define TOR_USEC_PER_SEC 1000000