build: fix the Haiku cmake build

PR-URL: https://github.com/libuv/libuv/pull/2994
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
David Carlier 2020-09-13 18:36:16 +00:00 committed by cjihrig
parent c4e50d9ff5
commit a7b3b0d0e7
No known key found for this signature in database
GPG Key ID: 7434390BDBE9B9C5

View File

@ -298,6 +298,18 @@ if(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
list(APPEND uv_sources src/unix/no-proctitle.c src/unix/sunos.c)
endif()
if(CMAKE_SYSTEM_NAME STREQUAL "Haiku")
list(APPEND uv_defines _BSD_SOURCE)
list(APPEND uv_libraries bsd network)
list(APPEND uv_sources
src/unix/haiku.c
src/unix/bsd-ifaddrs.c
src/unix/no-fsevents.c
src/unix/no-proctitle.c
src/unix/posix-hrtime.c
src/unix/posix-poll.c)
endif()
if(APPLE OR CMAKE_SYSTEM_NAME MATCHES "DragonFly|FreeBSD|Linux|NetBSD|OpenBSD")
list(APPEND uv_test_libraries util)
endif()