Skip to content

Commit d51b418

Browse files
Add getmntinfo and getmntinfo functions, MNT_WAIT and MNT_NOWAIT constants
1 parent 49776c2 commit d51b418

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/unix/bsd/apple/mod.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3207,6 +3207,10 @@ pub const TIME_OOP: ::c_int = 3;
32073207
pub const TIME_WAIT: ::c_int = 4;
32083208
pub const TIME_ERROR: ::c_int = 5;
32093209

3210+
// <sys/mount.h>
3211+
pub const MNT_WAIT: ::c_int = 1;
3212+
pub const MNT_NOWAIT: ::c_int = 2;
3213+
32103214
cfg_if! {
32113215
if #[cfg(libc_const_size_of)] {
32123216
fn __DARWIN_ALIGN32(p: usize) -> usize {
@@ -3744,6 +3748,21 @@ extern "C" {
37443748

37453749
pub fn ntp_adjtime(buf: *mut timex) -> ::c_int;
37463750
pub fn ntp_gettime(buf: *mut ntptimeval) -> ::c_int;
3751+
3752+
#[cfg_attr(
3753+
all(target_os = "macos", not(target_arch = "aarch64")),
3754+
link_name = "getmntinfo$INODE64"
3755+
)]
3756+
pub fn getmntinfo(mntbufp: *mut *mut statfs, flags: ::c_int) -> ::c_int;
3757+
#[cfg_attr(
3758+
all(target_os = "macos", not(target_arch = "aarch64")),
3759+
link_name = "getfsstat$INODE64"
3760+
)]
3761+
pub fn getfsstat(
3762+
mntbufp: *mut statfs,
3763+
bufsize: ::c_int,
3764+
flags: ::c_int,
3765+
) -> ::c_int;
37473766
}
37483767

37493768
cfg_if! {

0 commit comments

Comments
 (0)