From 8e62f5e9e6c546dd83d76299e01f6473eb87dfd7 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Mon, 9 Dec 2024 17:25:39 -0500 Subject: [PATCH 1/2] MINOR: [C++][CMake] Fix building on OpenBSD OpenBSD does not have librt. Signed-off-by: Brad Smith --- cpp/src/arrow/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/src/arrow/CMakeLists.txt b/cpp/src/arrow/CMakeLists.txt index f1f3b1c30b701..d6e6111227b0a 100644 --- a/cpp/src/arrow/CMakeLists.txt +++ b/cpp/src/arrow/CMakeLists.txt @@ -166,7 +166,7 @@ if(WIN32) list(APPEND ARROW_SYSTEM_LINK_LIBS "ws2_32") endif() -if(NOT WIN32 AND NOT APPLE) +if(NOT WIN32 AND NOT APPLE AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD") # Pass -lrt on Linux only list(APPEND ARROW_SYSTEM_LINK_LIBS rt) endif() From b9cbcf10fbfcdaad94ebc58984ca2cf284ffe9a1 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Wed, 11 Dec 2024 09:34:45 +0900 Subject: [PATCH 2/2] Simplify condition --- cpp/src/arrow/CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cpp/src/arrow/CMakeLists.txt b/cpp/src/arrow/CMakeLists.txt index d6e6111227b0a..dad709e3dea7f 100644 --- a/cpp/src/arrow/CMakeLists.txt +++ b/cpp/src/arrow/CMakeLists.txt @@ -166,8 +166,7 @@ if(WIN32) list(APPEND ARROW_SYSTEM_LINK_LIBS "ws2_32") endif() -if(NOT WIN32 AND NOT APPLE AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD") - # Pass -lrt on Linux only +if(CMAKE_SYSTEM_NAME STREQUAL "Linux") list(APPEND ARROW_SYSTEM_LINK_LIBS rt) endif()