From 504ccad1fa018b2b432eda092bd536134ee6b39f Mon Sep 17 00:00:00 2001 From: antirez Date: Wed, 6 Jul 2016 16:31:11 +0200 Subject: [PATCH] Fix definition of M_PI in geohash_helper.c. Without the right feature macros M_PI is not defined in math.h. --- src/geohash_helper.c | 2 ++ src/geohash_helper.h | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/geohash_helper.c b/src/geohash_helper.c index da8833fa8..585d1005b 100644 --- a/src/geohash_helper.c +++ b/src/geohash_helper.c @@ -34,7 +34,9 @@ * https://github.com/yinqiwen/ardb/blob/d42503/src/geo/geohash_helper.cpp */ +#include "fmacros.h" #include "geohash_helper.h" +#include #define D_R (M_PI / 180.0) #define R_MAJOR 6378137.0 diff --git a/src/geohash_helper.h b/src/geohash_helper.h index bff111dbe..eb0dda38a 100644 --- a/src/geohash_helper.h +++ b/src/geohash_helper.h @@ -32,7 +32,6 @@ #ifndef GEOHASH_HELPER_HPP_ #define GEOHASH_HELPER_HPP_ -#include #include "geohash.h" #define GZERO(s) s.bits = s.step = 0;