Skip to content

Commit

Permalink
fn __sysconf: Replace with libc::sysconf.
Browse files Browse the repository at this point in the history
  • Loading branch information
kkysen committed Sep 25, 2023
1 parent 91d7cb3 commit b25c368
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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")]
Expand All @@ -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,
Expand Down Expand Up @@ -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);
}
}
}
Expand Down

0 comments on commit b25c368

Please sign in to comment.