commit f9e79a94e4a30f365cc34d6c979e9af139d6cb3f
parent 44d6abfb5e6f1a629c090a0da60f433a73684ce7
Author: Frederic Cambus <fred@statdns.com>
Date: Sat, 9 Jan 2016 23:10:36 +0100
Moving the GeoIP path trailing slash to the CMake definition
Diffstat:
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
@@ -42,7 +42,7 @@ endif()
SET(GEOIPDATA ${CMAKE_INSTALL_PREFIX}/share/GeoIP CACHE PATH "Path to GeoIP data files")
add_definitions(-Wall -Wextra -Werror -std=c99 -pedantic)
-add_definitions(-DDATADIR="${GEOIPDATA}")
+add_definitions(-DDATADIR="${GEOIPDATA}/")
add_executable(logswan ${SRC} ${DEPS})
target_link_libraries(logswan ${GEOIP_LIBRARIES} ${JANSSON_LIBRARIES} m)
diff --git a/src/logswan.c b/src/logswan.c
@@ -110,8 +110,8 @@ int main (int argc, char *argv[]) {
begin = clock();
/* Initializing GeoIP */
- geoip = GeoIP_open(DATADIR "/GeoIP.dat", GEOIP_MEMORY_CACHE);
- geoipv6 = GeoIP_open(DATADIR "/GeoIPv6.dat", GEOIP_MEMORY_CACHE);
+ geoip = GeoIP_open(DATADIR "GeoIP.dat", GEOIP_MEMORY_CACHE);
+ geoipv6 = GeoIP_open(DATADIR "GeoIPv6.dat", GEOIP_MEMORY_CACHE);
/* Get log file size */
stat(intputFile, &logFileSize);