Skip to content

Commit

Permalink
[lldb] Fix LLDB compilation with ncurses 6.2 due to wattr_set/get bei…
Browse files Browse the repository at this point in the history
…ng a macro

My ncurses 6.2 arch defines those two functions as macros, so the scope operator
doesn't work here.
  • Loading branch information
Teemperor committed Aug 6, 2020
1 parent a512c89 commit d40c44e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lldb/source/Core/IOHandlerCursesGUI.cpp
Expand Up @@ -486,7 +486,7 @@ class Window {
attr_t saved_attr;
short saved_pair;
int saved_opts;
::wattr_get(m_window, &saved_attr, &saved_pair, &saved_opts);
wattr_get(m_window, &saved_attr, &saved_pair, &saved_opts);
if (use_blue_background)
::wattron(m_window, COLOR_PAIR(WhiteOnBlue));
while (!string.empty()) {
Expand Down Expand Up @@ -522,7 +522,7 @@ class Window {
continue;
}
if (value == 0) { // Reset.
::wattr_set(m_window, saved_attr, saved_pair, &saved_opts);
wattr_set(m_window, saved_attr, saved_pair, &saved_opts);
if (use_blue_background)
::wattron(m_window, COLOR_PAIR(WhiteOnBlue));
} else {
Expand All @@ -531,7 +531,7 @@ class Window {
COLOR_PAIR(value - 30 + 1 + (use_blue_background ? 8 : 0)));
}
}
::wattr_set(m_window, saved_attr, saved_pair, &saved_opts);
wattr_set(m_window, saved_attr, saved_pair, &saved_opts);
}

void Touch() {
Expand Down

0 comments on commit d40c44e

Please sign in to comment.