From b25c3682d6e7980da6c9c5f7a5a39effae2c3d9a Mon Sep 17 00:00:00 2001 From: Khyber Sen Date: Wed, 20 Sep 2023 18:12:07 -0700 Subject: [PATCH] `fn __sysconf`: Replace with `libc::sysconf`. --- src/lib.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index b668264ab..d509a144b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -95,7 +95,6 @@ use libc::pthread_t; use std::cmp; use std::ffi::c_char; use std::ffi::c_int; -use std::ffi::c_long; use std::ffi::c_uint; use std::ffi::c_ulong; use std::ffi::c_void; @@ -104,6 +103,9 @@ use std::process::abort; #[cfg(target_os = "linux")] use libc::dlsym; +#[cfg(target_os = "linux")] +use libc::sysconf; + extern "C" { fn dav1d_num_logical_processors(c: *mut Dav1dContext) -> c_int; #[cfg(feature = "bitdepth_16")] @@ -124,7 +126,6 @@ extern "C" { w: c_int, src: *const Dav1dPicture, ) -> c_int; - fn __sysconf(__name: c_int) -> c_long; fn pthread_create( __newthread: *mut pthread_t, __attr: *const pthread_attr_t, @@ -219,7 +220,7 @@ unsafe extern "C" fn get_stack_size_internal(_thread_attr: *const pthread_attr_t )); if get_minstack.is_some() { return (get_minstack.expect("non-null function pointer")(_thread_attr)) - .wrapping_sub(__sysconf(75) as usize); + .wrapping_sub(sysconf(75) as usize); } } }