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 @@ pub fn tgetstr( 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 {