Skip to content

Commit

Permalink
Fix build on OpenSUSE Tumbleweed
Browse files Browse the repository at this point in the history
Fix a search & replace gone wrong in 1234c77 (Support linking against
reentrant-configured curses, 2024-01-21).
  • Loading branch information
krobelus committed Jan 21, 2024
1 parent 89282fd commit 3839773
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down
4 changes: 2 additions & 2 deletions src/curses.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 3839773

Please sign in to comment.