commit dd21492e1eed55567f9f4f095366dbb3abd64c59
parent 482d9b9d514ec3f4f64b960893039b860ded9822
Author: Frederic Cambus <fred@statdns.com>
Date: Sun, 21 Jan 2018 17:54:52 +0100
Do not link against GeoIP anymore
Diffstat:
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
@@ -28,11 +28,6 @@ check_function_exists(strtonum HAVE_STRTONUM)
include_directories("compat")
include_directories("deps/hll")
-# GeoIP
-find_path(GEOIP_INCLUDE_DIRS GeoIP.h)
-find_library(GEOIP_LIBRARIES NAMES GeoIP REQUIRED)
-include_directories(${GEOIP_INCLUDE_DIRS})
-
# libmaxminddb
find_path(GEOIP2_INCLUDE_DIRS maxminddb.h)
find_library(GEOIP2_LIBRARIES NAMES maxminddb REQUIRED)
@@ -61,7 +56,7 @@ add_definitions(-Wall -Wextra -Werror -std=c99 -pedantic)
add_definitions(-DGEOIP2DIR="${GEOIP2DIR}/")
add_executable(logswan ${SRC} ${DEPS})
-target_link_libraries(logswan ${GEOIP_LIBRARIES} ${GEOIP2_LIBRARIES} ${JANSSON_LIBRARIES} m)
+target_link_libraries(logswan ${GEOIP2_LIBRARIES} ${JANSSON_LIBRARIES} m)
install(TARGETS logswan DESTINATION bin)
install(FILES logswan.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1/)
diff --git a/src/output.c b/src/output.c
@@ -12,7 +12,6 @@
/* */
/*****************************************************************************/
-#include <GeoIP.h>
#include <jansson.h>
#include "config.h"
@@ -41,6 +40,7 @@ char
}
}
+/*
for (size_t loop = 0; loop < COUNTRIES; loop++) {
if (results->countries[loop]) {
json_array_append_new(
@@ -51,6 +51,7 @@ char
"hits", results->countries[loop]));
}
}
+*/
for (size_t loop = 0; loop < 24; loop++) {
if (results->hours[loop]) {