Closed arichardson closed 3 years ago
Which macOS version, Big Sur?
Yes this appears to be needed on both macOS Big Sur and FreeBSD 12.2.
Yes this appears to be needed on both macOS Big Sur and FreeBSD 12.2.
Confirmed. Please apply this change instead:
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 66d3ca2..4679463 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -148,6 +148,7 @@ if(USE_WIDECHAR)
target_sources(regex PRIVATE ${REGEX_SRCS})
target_include_directories(regex PUBLIC regex)
target_compile_definitions(regex PUBLIC __REGEX_PRIVATE)
+ target_compile_definitions(nvi PRIVATE _XOPEN_SOURCE_EXTENDED)
target_link_libraries(nvi PRIVATE regex)
else()
find_library(CURSES_LIBRARY NAMES ncurses curses HINTS /usr/lib)
Also, please consider changing the commit title and issue title to something more specific. A hundred issues can be titled "Fix macOS and FreeBSD build."
Updated to scope the define to nvi only.
Thanks.
The macro _XOPEN_SOURCE_EXTENDED is needed to get the waddnwstr() definition on at least FreeBSD and recent macOS. This causes -Werror build failures due to -Wimplicit-function-declaration.