Index: lldb/include/lldb/Host/Config.h.cmake =================================================================== --- lldb/include/lldb/Host/Config.h.cmake +++ lldb/include/lldb/Host/Config.h.cmake @@ -38,6 +38,8 @@ #cmakedefine01 LLDB_ENABLE_CURSES +#cmakedefine01 CURSES_HAVE_NCURSES_CURSES_H + #cmakedefine01 LLDB_ENABLE_LIBEDIT #cmakedefine01 LLDB_ENABLE_LIBXML2 Index: lldb/source/Core/IOHandlerCursesGUI.cpp =================================================================== --- lldb/source/Core/IOHandlerCursesGUI.cpp +++ lldb/source/Core/IOHandlerCursesGUI.cpp @@ -10,9 +10,14 @@ #include "lldb/Host/Config.h" #if LLDB_ENABLE_CURSES +#if CURSES_HAVE_NCURSES_CURSES_H +#include +#include +#else #include #include #endif +#endif #if defined(__APPLE__) #include