Commit 504ccad1 authored by antirez's avatar antirez
Browse files

Fix definition of M_PI in geohash_helper.c.

Without the right feature macros M_PI is not defined in math.h.
parent eaa713e9
...@@ -34,7 +34,9 @@ ...@@ -34,7 +34,9 @@
* https://github.com/yinqiwen/ardb/blob/d42503/src/geo/geohash_helper.cpp * https://github.com/yinqiwen/ardb/blob/d42503/src/geo/geohash_helper.cpp
*/ */
#include "fmacros.h"
#include "geohash_helper.h" #include "geohash_helper.h"
#include <math.h>
#define D_R (M_PI / 180.0) #define D_R (M_PI / 180.0)
#define R_MAJOR 6378137.0 #define R_MAJOR 6378137.0
......
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
#ifndef GEOHASH_HELPER_HPP_ #ifndef GEOHASH_HELPER_HPP_
#define GEOHASH_HELPER_HPP_ #define GEOHASH_HELPER_HPP_
#include <math.h>
#include "geohash.h" #include "geohash.h"
#define GZERO(s) s.bits = s.step = 0; #define GZERO(s) s.bits = s.step = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment