Meta+Ladybird: Add some extra definitions for Haiku

This commit is contained in:
nipos 2023-08-27 20:53:47 +02:00 committed by Andrew Kaster
parent fa4357b7ea
commit e345085329
Notes: sideshowbarker 2024-07-19 16:52:13 +09:00
2 changed files with 14 additions and 0 deletions

View File

@ -45,6 +45,13 @@ if (ENABLE_UNDEFINED_SANITIZER)
add_link_options(-fsanitize=undefined)
endif()
if (HAIKU)
# Haiku needs some extra compile definitions to make important stuff in its headers available.
add_compile_definitions(_DEFAULT_SOURCE)
add_compile_definitions(_GNU_SOURCE)
add_compile_definitions(__USE_GNU)
endif()
# Lagom
# FIXME: PROJECT_IS_TOP_LEVEL with CMake 3.21+
set(LADYBIRD_IS_TOP_LEVEL FALSE)

View File

@ -112,6 +112,13 @@ if (ENABLE_COMPILETIME_FORMAT_CHECK)
add_compile_definitions(ENABLE_COMPILETIME_FORMAT_CHECK)
endif()
if (HAIKU)
# Haiku needs some extra compile definitions to make important stuff in its headers available.
add_compile_definitions(_DEFAULT_SOURCE)
add_compile_definitions(_GNU_SOURCE)
add_compile_definitions(__USE_GNU)
endif()
if (ENABLE_FUZZERS)
add_compile_options(-fno-omit-frame-pointer)
endif()