Skip to content

Commit 1b4c03f

Browse files
compnerdrokhinip
authored andcommitted
Revert "Revert "Remove libbsd dependency for Linux""
This reverts commit 4b87733. Signed-off-by: Kim Topley <[email protected]>
1 parent 39f0cd4 commit 1b4c03f

File tree

5 files changed

+4
-19
lines changed

5 files changed

+4
-19
lines changed

CMakeLists.txt

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -197,15 +197,6 @@ check_function_exists(strlcpy HAVE_STRLCPY)
197197
check_function_exists(sysconf HAVE_SYSCONF)
198198
check_function_exists(arc4random HAVE_ARC4RANDOM)
199199

200-
if(NOT HAVE_STRLCPY AND NOT HAVE_GETPROGNAME)
201-
include(FindPkgConfig)
202-
pkg_check_modules(BSD_OVERLAY libbsd-overlay)
203-
if(BSD_OVERLAY_FOUND)
204-
set(HAVE_STRLCPY 1 CACHE INTERNAL "Have function strlcpy" FORCE)
205-
set(HAVE_GETPROGNAME 1 CACHE INTERNAL "Have function getprogname" FORCE)
206-
endif()
207-
endif()
208-
209200
find_package(Threads REQUIRED)
210201

211202
check_include_files("TargetConditionals.h" HAVE_TARGETCONDITIONALS_H)

src/CMakeLists.txt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -204,11 +204,6 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL Android)
204204
PRIVATE
205205
-U_GNU_SOURCE)
206206
endif()
207-
if(BSD_OVERLAY_FOUND)
208-
target_compile_options(dispatch
209-
PRIVATE
210-
${BSD_OVERLAY_CFLAGS})
211-
endif()
212207
if("${CMAKE_C_SIMULATE_ID}" STREQUAL "MSVC")
213208
target_compile_options(dispatch
214209
PRIVATE
@@ -230,9 +225,6 @@ else()
230225
-fblocks
231226
-momit-leaf-frame-pointer)
232227
endif()
233-
if(BSD_OVERLAY_FOUND)
234-
target_link_libraries(dispatch PRIVATE ${BSD_OVERLAY_LDFLAGS})
235-
endif()
236228
if(LibRT_FOUND)
237229
target_link_libraries(dispatch PRIVATE RT::rt)
238230
endif()

src/internal.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,10 @@ upcast(dispatch_object_t dou)
282282
#include <linux/sysctl.h>
283283
#else
284284
#include <sys/sysctl.h>
285-
#include <sys/queue.h>
286285
#endif /* __ANDROID__ */
286+
#if !defined(__linux__)
287+
#include <sys/queue.h>
288+
#endif
287289
#include <sys/socket.h>
288290
#include <sys/time.h>
289291
#include <sys/mman.h>

src/shims.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
#include "shims/generic_win_stubs.h"
3434
#endif // defined(_WIN32)
3535

36-
#if defined(_WIN32) || defined(__ANDROID__)
36+
#if defined(_WIN32) || defined(__linux__)
3737
#include "shims/generic_sys_queue.h"
3838
#endif
3939

File renamed without changes.

0 commit comments

Comments
 (0)