Skip to content

Document stat.st_blksize changes on DragonFly BSD #2487

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/unix/bsd/freebsdlike/dragonfly/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ s! {
pub f_uid_uuid: ::uuid_t,
}

#[deprecated(
since = "0.2.107",
note = "stat.st_blksize is an i64 and stat.st_qspare1 is replaced with \
stat.st_blksize in DragonFly 5.8"
)]
pub struct stat {
pub st_ino: ::ino_t,
pub st_nlink: ::nlink_t,
Expand Down
4 changes: 4 additions & 0 deletions src/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,7 @@ extern "C" {
all(target_os = "freebsd", any(freebsd11, freebsd10)),
link_name = "fstat@FBSD_1.0"
)]
#[cfg_attr(target_os = "dragonfly", allow(deprecated))]
pub fn fstat(fildes: ::c_int, buf: *mut stat) -> ::c_int;

pub fn mkdir(path: *const c_char, mode: mode_t) -> ::c_int;
Expand All @@ -712,6 +713,7 @@ extern "C" {
all(target_os = "freebsd", any(freebsd11, freebsd10)),
link_name = "stat@FBSD_1.0"
)]
#[cfg_attr(target_os = "dragonfly", allow(deprecated))]
pub fn stat(path: *const c_char, buf: *mut stat) -> ::c_int;

pub fn pclose(stream: *mut ::FILE) -> ::c_int;
Expand Down Expand Up @@ -796,6 +798,7 @@ extern "C" {
all(target_os = "freebsd", any(freebsd11, freebsd10)),
link_name = "fstatat@FBSD_1.1"
)]
#[cfg_attr(target_os = "dragonfly", allow(deprecated))]
pub fn fstatat(
dirfd: ::c_int,
pathname: *const ::c_char,
Expand Down Expand Up @@ -987,6 +990,7 @@ extern "C" {
all(target_os = "freebsd", any(freebsd11, freebsd10)),
link_name = "lstat@FBSD_1.0"
)]
#[cfg_attr(target_os = "dragonfly", allow(deprecated))]
pub fn lstat(path: *const c_char, buf: *mut stat) -> ::c_int;

#[cfg_attr(
Expand Down