From 38397734e2a1658ff4795b656cb39379cbee7989 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Sun, 21 Jan 2024 22:19:53 +0100 Subject: [PATCH] Fix build on OpenSUSE Tumbleweed Fix a search & replace gone wrong in 1234c77b1 (Support linking against reentrant-configured curses, 2024-01-21). --- build.rs | 2 +- src/curses.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.rs b/build.rs index f4a5e1f33..429c21de6 100644 --- a/build.rs +++ b/build.rs @@ -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"); } diff --git a/src/curses.rs b/src/curses.rs index 7bbc13ec9..bd86ff24c 100644 --- a/src/curses.rs +++ b/src/curses.rs @@ -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 {