ggstd/syscall/
syscall_clib.rs

1// Copyright 2023 The rust-ggstd authors. All rights reserved.
2
3use crate::libc_;
4
5// get_uid returns the numeric user id of the caller.
6//
7// On Windows, it returns -1.
8pub fn get_uid() -> isize {
9    unsafe { libc_::getuid() as isize }
10}