You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: procps.rs
    path of file: ./repos/rustybox/libbb
    
    the code of the file until where you have to start completion: use crate::libbb::ptr_to_globals::bb_errno;
use crate::libbb::skip_whitespace::skip_whitespace;
use crate::librb::size_t;
use libc;
use libc::close;
use libc::closedir;
use libc::dirent;
use libc::fclose;
use libc::free;
use libc::gid_t;
use libc::open;
use libc::opendir;
use libc::pid_t;
use libc::readdir;
use libc::sprintf;
use libc::sscanf;
use libc::ssize_t;
use libc::stat;
use libc::strchr;
use libc::strcmp;
use libc::strcpy;
use libc::strr
    
unsafe fn alloc_procps_scan() -> *mut procps_status_t {
  let mut n: libc::c_uint = getpagesize() as libc::c_uint;
  let mut sp: *mut procps_status_t = crate::libbb::xfuncs_printf::xzalloc(::std::mem::size_of::<
    procps_status_t,
  >() as libc::c_ulong) as *mut procps_status_t;
  (*sp).dir =
    crate::libbb::xfuncs_printf::xopendir(b"/proc\x00" as *const u8 as *const libc::c_char);
  loop {
    n >>= 1i32;
    if n == 0 {
      break;
    }
    (*sp).shift_pages_to_bytes = (*sp).shift_pages_to_bytes.wrapping_add(1)
  }
  (*sp).shift_pages_to_kb = ((*sp).shift_pages_to_bytes as libc::c_int - 10i32) as u8;
  return sp;
}