[tor-commits] [tor/master] Add timeval.h include to compat_pthreads.c for timeradd()

nickm at torproject.org nickm at torproject.org
Fri Nov 2 13:38:54 UTC 2018


commit 267b8d16b1fdc4e4730893aeee26e4dded97ad2d
Author: Nick Mathewson <nickm at torproject.org>
Date:   Wed Oct 10 12:18:05 2018 -0400

    Add timeval.h include to compat_pthreads.c for timeradd()
    
    OpenSolaris apparently doesn't have timeradd(), so we added a
    replacement, but we weren't including it here after the big
    refactoring in 0.3.5.1-alpha.
    
    Fixes bug 27963; bugfix on 0.3.5.1-alpha.
---
 changes/bug27963_timeradd        | 4 ++++
 src/lib/thread/.may_include      | 1 +
 src/lib/thread/compat_pthreads.c | 1 +
 3 files changed, 6 insertions(+)

diff --git a/changes/bug27963_timeradd b/changes/bug27963_timeradd
new file mode 100644
index 000000000..34b361cf8
--- /dev/null
+++ b/changes/bug27963_timeradd
@@ -0,0 +1,4 @@
+  o Minor bugfixes (compilation, opensolaris):
+    - Add a missing include to compat_pthreads.c, to fix compilation
+      on OpenSolaris and its descendants. Fixes bug 27963; bugfix
+      on 0.3.5.1-alpha.
diff --git a/src/lib/thread/.may_include b/src/lib/thread/.may_include
index 93ad0cd73..fc56f4683 100644
--- a/src/lib/thread/.may_include
+++ b/src/lib/thread/.may_include
@@ -4,3 +4,4 @@ lib/lock/*.h
 lib/log/*.h
 lib/testsupport/*.h
 lib/thread/*.h
+lib/wallclock/*.h
diff --git a/src/lib/thread/compat_pthreads.c b/src/lib/thread/compat_pthreads.c
index 934067e4c..e5c8805dd 100644
--- a/src/lib/thread/compat_pthreads.c
+++ b/src/lib/thread/compat_pthreads.c
@@ -12,6 +12,7 @@
 
 #include "orconfig.h"
 #include "lib/thread/threads.h"
+#include "lib/wallclock/timeval.h"
 #include "lib/log/log.h"
 #include "lib/log/util_bug.h"
 





More information about the tor-commits mailing list