Skip to content

Commit

Permalink
apacheGH-44994: [C++][CMake] Use librt only for Linux (apache#44984)
Browse files Browse the repository at this point in the history
### Rationale for this change

OpenBSD does not have `librt.so`.

### What changes are included in this PR?

Use `librt.so` only for Linux

### Are these changes tested?

Yes.

### Are there any user-facing changes?

Yes.

* GitHub Issue: apache#44994

Lead-authored-by: Brad Smith <[email protected]>
Co-authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
  • Loading branch information
brad0 and kou authored Dec 11, 2024
1 parent 72dc869 commit e8a85dc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cpp/src/arrow/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,7 @@ if(WIN32)
list(APPEND ARROW_SYSTEM_LINK_LIBS "ws2_32")
endif()

if(NOT WIN32 AND NOT APPLE)
# Pass -lrt on Linux only
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
list(APPEND ARROW_SYSTEM_LINK_LIBS rt)
endif()

Expand Down

0 comments on commit e8a85dc

Please sign in to comment.