Fix build on OpenSUSE Tumbleweed

Fix a search & replace gone wrong in 1234c77b1 (Support linking against
reentrant-configured curses, 2024-01-21).
This commit is contained in:
Johannes Altmanninger 2024-01-21 22:19:53 +01:00
parent 89282fd9bc
commit 38397734e2
2 changed files with 3 additions and 3 deletions

View file

@ -61,7 +61,7 @@ fn main() {
for lib in curses_libraries {
if target.has_symbol("_nc_cur_term", &lib) {
rsconf::enable_cfg("_nc_cur_term");
rsconf::enable_cfg("have_nc_cur_term");
if target.has_symbol("cur_term", &lib) {
rsconf::warn!("curses provides both cur_term and _nc_cur_term");
}

View file

@ -65,7 +65,7 @@ mod sys {
#[cfg(not(have_nc_cur_term))]
pub static mut cur_term: *const core::ffi::c_void;
#[cfg(have_nc_cur_term)]
pub fn have_nc_cur_term() -> *const core::ffi::c_void;
pub fn _nc_cur_term() -> *const core::ffi::c_void;
/// setupterm(3) is a low-level call to begin doing any sort of `term.h`/`curses.h` work.
/// It's called internally by ncurses's `initscr()` and `newterm()`, but the C++ code called
@ -105,7 +105,7 @@ mod sys {
fn get_curterm() -> *const core::ffi::c_void {
#[cfg(have_nc_cur_term)]
unsafe {
sys::have_nc_cur_term()
sys::_nc_cur_term()
}
#[cfg(not(have_nc_cur_term))]
unsafe {