Author: Luboš Luňák Date: 2020-08-05T09:51:12+02:00 New Revision: c952ec15d38843b69e22dfd7b0665304a0459f9f
URL: https://github.com/llvm/llvm-project/commit/c952ec15d38843b69e22dfd7b0665304a0459f9f DIFF: https://github.com/llvm/llvm-project/commit/c952ec15d38843b69e22dfd7b0665304a0459f9f.diff LOG: [lldb] fix building with panel.h being in /usr/include/ncurses/ My openSUSE 15.2 has /usr/include/curses.h as a symlink to /usr/include/ncurses/curses.h , but there's no such symlink for panel.h . Prefer using /usr/include/ncurses for the includes if they are found there by the CMake check. Differential Revision: https://reviews.llvm.org/D85219 Added: Modified: lldb/include/lldb/Host/Config.h.cmake lldb/source/Core/IOHandlerCursesGUI.cpp Removed: ################################################################################ diff --git a/lldb/include/lldb/Host/Config.h.cmake b/lldb/include/lldb/Host/Config.h.cmake index 42f4ca1a26c6..7467f429b628 100644 --- a/lldb/include/lldb/Host/Config.h.cmake +++ b/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 diff --git a/lldb/source/Core/IOHandlerCursesGUI.cpp b/lldb/source/Core/IOHandlerCursesGUI.cpp index 144b2112183c..55c80e778060 100644 --- a/lldb/source/Core/IOHandlerCursesGUI.cpp +++ b/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 <ncurses/curses.h> +#include <ncurses/panel.h> +#else #include <curses.h> #include <panel.h> #endif +#endif #if defined(__APPLE__) #include <deque> _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits