From e0669ba93d252909d5edab4ff79e620270143aa6 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 5 Sep 2015 13:05:53 +0200 Subject: [PATCH 1/2] Fixes warning about posix_memalign --- .../libs/volk_gnsssdr_module/volk_gnsssdr/lib/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/lib/CMakeLists.txt b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/lib/CMakeLists.txt index 99852beb0..62cdb5da8 100644 --- a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/lib/CMakeLists.txt +++ b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/lib/CMakeLists.txt @@ -79,6 +79,10 @@ if(HAVE_POSIX_MEMALIGN) add_definitions(-DHAVE_POSIX_MEMALIGN) endif(HAVE_POSIX_MEMALIGN) +if(NOT DEFINED _XOPEN_SOURCE) + add_definitions(-D_XOPEN_SOURCE=700) +endif(NOT DEFINED _XOPEN_SOURCE) + ######################################################################## # detect x86 flavor of CPU ######################################################################## From 5ad8b87f68d80fcb9ff05ff02f452752e31674ba Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 6 Sep 2015 17:06:00 +0200 Subject: [PATCH 2/2] Pass C compiler flags to volk_gnsssdr_module. It fixes the lintian warning 'hardening-no-fortify-functions' when building a .deb package --- CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ae5c5d4e2..8a6e6a9ae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -419,7 +419,14 @@ if(OS_IS_MACOSX) endif(CMAKE_GENERATOR STREQUAL Xcode) endif(OS_IS_MACOSX) if(NOT VOLK_GNSSSDR_FOUND) - set(VOLK_GNSSSDR_CMAKE_ARGS -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module/install -DENABLE_STATIC_LIBS=ON ${STRIP_VOLK_GNSSSDR_PROFILE} ${USE_THIS_PYTHON}) + set(VOLK_GNSSSDR_CMAKE_ARGS -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} + -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} + -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module/install + -DENABLE_STATIC_LIBS=ON + -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} + -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} + ${STRIP_VOLK_GNSSSDR_PROFILE} + ${USE_THIS_PYTHON} ) if(CMAKE_TOOLCHAIN_FILE) set(VOLK_GNSSSDR_CMAKE_ARGS ${VOLK_GNSSSDR_CMAKE_ARGS} -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}) endif(CMAKE_TOOLCHAIN_FILE)