Skip to content

Commit

Permalink
Raspbian Linux 10 Buster fixes. Kernel 4.19+
Browse files Browse the repository at this point in the history
Replace deprecated define
Cast-away constness in rs-depth (gcc version 8.3.0 (Raspbian 8.3.0-6+rpi1))
  • Loading branch information
ev-mp committed Oct 9, 2019
1 parent 39415e7 commit 838bde8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CMake/android_config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ macro(os_set_flags)
set(BUILD_WITH_OPENMP OFF)
set(BUILD_GRAPHICAL_EXAMPLES OFF)
set(ANDROID_STL "c++_static")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -pedantic -g -D_BSD_SOURCE")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -pedantic -g -D_DEFAULT_SOURCE")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -pedantic -g -Wno-missing-field-initializers")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-switch -Wno-multichar")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fPIE -pie")
Expand Down
6 changes: 3 additions & 3 deletions CMake/unix_config.cmake
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
message(STATUS "Setting Unix configurations")

macro(os_set_flags)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -pedantic -g -D_BSD_SOURCE")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -pedantic -g -D_DEFAULT_SOURCE")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -pedantic -g -Wno-missing-field-initializers")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-switch -Wno-multichar -Wsequence-point -Wformat -Wformat-security")

execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpmachine OUTPUT_VARIABLE MACHINE)
if(${MACHINE} MATCHES "arm-linux-gnueabihf")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfpu=neon -mfloat-abi=hard -ftree-vectorize")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpu=neon -mfloat-abi=hard -ftree-vectorize")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfpu=neon -mfloat-abi=hard -ftree-vectorize -latomic")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpu=neon -mfloat-abi=hard -ftree-vectorize -latomic")
elseif(${MACHINE} MATCHES "aarch64-linux-gnu")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mstrict-align -ftree-vectorize")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mstrict-align -ftree-vectorize")
Expand Down
2 changes: 1 addition & 1 deletion examples/C/depth/rs-depth.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ int main()
exit(EXIT_FAILURE);
}

const rs2_stream_profile* stream_profile = rs2_get_stream_profile(stream_profile_list, 0, &e);
rs2_stream_profile* stream_profile = (rs2_stream_profile*)rs2_get_stream_profile(stream_profile_list, 0, &e);
if (e)
{
printf("Failed to create stream profile!\n");
Expand Down

0 comments on commit 838bde8

Please sign in to comment.