CMakeLists.txt: fix macOS build

This commit is contained in:
Přemysl Eric Janouch 2021-11-02 17:17:32 +01:00
parent 56efe9c6a9
commit 6bd8c1db2f
Signed by: p
GPG Key ID: A0420B94F92B9493
2 changed files with 2 additions and 2 deletions

View File

@ -58,6 +58,8 @@ if ("${CMAKE_SYSTEM_NAME}" MATCHES "BSD")
# Need this for SIGWINCH in FreeBSD and OpenBSD respectively;
# our POSIX version macros make it undefined
add_definitions (-D__BSD_VISIBLE=1 -D_BSD_SOURCE=1)
elseif (APPLE)
add_definitions (-D_DARWIN_C_SOURCE)
endif ()
include (CheckFunctionExists)

View File

@ -78,9 +78,7 @@ enum
#include <math.h>
#include <locale.h>
#include <termios.h>
#ifndef TIOCGWINSZ
#include <sys/ioctl.h>
#endif // ! TIOCGWINSZ
// ncurses is notoriously retarded for input handling, we need something
// different if only to receive mouse events reliably.