Skip to content

Commit

Permalink
cmake: fix resolv on FreeBSD (#1152)
Browse files Browse the repository at this point in the history
* ci/freebsd: use ubuntu-latest
* resolv functions are provided by libc instead libresolv.so
  • Loading branch information
sreimers authored Jul 4, 2024
1 parent 4adf66a commit 24a78db
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/freebsd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
build:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
timeout-minutes: 20

env:
Expand Down
5 changes: 4 additions & 1 deletion cmake/re-config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
else()
check_symbol_exists(res_ninit resolv.h HAVE_RESOLV)
endif()
if(HAVE_RESOLV)
if(HAVE_RESOLV AND ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
list(APPEND RE_DEFINITIONS HAVE_RESOLV)
set(RESOLV_LIBRARY) # Provided by libc
elseif(HAVE_RESOLV)
set(RESOLV_LIBRARY resolv)
list(APPEND RE_DEFINITIONS HAVE_RESOLV)
else()
Expand Down

0 comments on commit 24a78db

Please sign in to comment.