mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 04:02:27 +00:00
feat(linux): provide getrandom implementation for macOS
This makes getrandom(2) usable when compiling with IDF_TARGET=linux on a macOS host.
This commit is contained in:
@@ -3,5 +3,10 @@ if(NOT "${target}" STREQUAL "linux")
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
|
||||
list(APPEND srcs getrandom.c)
|
||||
endif()
|
||||
|
||||
idf_component_register(INCLUDE_DIRS include
|
||||
REQUIRED_IDF_TARGETS linux)
|
||||
REQUIRED_IDF_TARGETS linux
|
||||
SRCS ${srcs})
|
||||
|
Reference in New Issue
Block a user