]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Silence a compilation warning on MSVC 2017 and clang-cl
authorteor <teor@torproject.org>
Thu, 23 Aug 2018 08:55:39 +0000 (18:55 +1000)
committerteor <teor@torproject.org>
Thu, 23 Aug 2018 23:15:04 +0000 (09:15 +1000)
test.c no longer uses lround(), so we don't need to declare it,
and we can use math.h for fabs().

Fixes bug 27185; bugfix on 0.2.2.2-alpha.

changes/bug27185 [new file with mode: 0644]
src/test/test.c

diff --git a/changes/bug27185 b/changes/bug27185
new file mode 100644 (file)
index 0000000..79221b3
--- /dev/null
@@ -0,0 +1,3 @@
+  o Minor bugfixes (Windows, compilation):
+    - Silence a compilation warning on MSVC 2017 and clang-cl.
+      Fixes bug 27185; bugfix on 0.2.2.2-alpha.
index 0fef6979093a6224972a8f1ca26d4fd977692f36..6330eb9b93b549ce73272e3c51645f7dd711332a 100644 (file)
@@ -22,6 +22,8 @@
 #include <dirent.h>
 #endif
 
+#include <math.h>
+
 /* These macros pull in declarations for some functions and structures that
  * are typically file-private. */
 #define GEOIP_PRIVATE
 #define MAIN_PRIVATE
 #define STATEFILE_PRIVATE
 
-/*
- * Linux doesn't provide lround in math.h by default, but mac os does...
- * It's best just to leave math.h out of the picture entirely.
- */
-//#include <math.h>
-long int lround(double x);
-double fabs(double x);
-
 #include "or.h"
 #include "backtrace.h"
 #include "buffers.h"