Skip to content

Commit b916b48

Browse files
committed
Auto merge of #2487 - rtzoeller:dfly_stat_deprecation, r=JohnTitor
Document stat.st_blksize changes on DragonFly BSD The tests are currently failing on DragonFly BSD, due to [changes to `stat.st_blksize`](DragonFlyBSD/DragonFlyBSD@34c6728) among other reasons. `st_blksize` is now an `i64`, and has moved to take up a previously reserved struct member. Deprecate the struct, to indicate it will be modified in a subsequent release.
2 parents 2638ea2 + 9d11d8d commit b916b48

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/unix/bsd/freebsdlike/dragonfly/mod.rs

+5
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,11 @@ s! {
106106
pub f_uid_uuid: ::uuid_t,
107107
}
108108

109+
#[deprecated(
110+
since = "0.2.107",
111+
note = "stat.st_blksize is an i64 and stat.st_qspare1 is replaced with \
112+
stat.st_blksize in DragonFly 5.8"
113+
)]
109114
pub struct stat {
110115
pub st_ino: ::ino_t,
111116
pub st_nlink: ::nlink_t,

src/unix/mod.rs

+4
Original file line numberDiff line numberDiff line change
@@ -699,6 +699,7 @@ extern "C" {
699699
all(target_os = "freebsd", any(freebsd11, freebsd10)),
700700
link_name = "fstat@FBSD_1.0"
701701
)]
702+
#[cfg_attr(target_os = "dragonfly", allow(deprecated))]
702703
pub fn fstat(fildes: ::c_int, buf: *mut stat) -> ::c_int;
703704

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

717719
pub fn pclose(stream: *mut ::FILE) -> ::c_int;
@@ -796,6 +798,7 @@ extern "C" {
796798
all(target_os = "freebsd", any(freebsd11, freebsd10)),
797799
link_name = "fstatat@FBSD_1.1"
798800
)]
801+
#[cfg_attr(target_os = "dragonfly", allow(deprecated))]
799802
pub fn fstatat(
800803
dirfd: ::c_int,
801804
pathname: *const ::c_char,
@@ -987,6 +990,7 @@ extern "C" {
987990
all(target_os = "freebsd", any(freebsd11, freebsd10)),
988991
link_name = "lstat@FBSD_1.0"
989992
)]
993+
#[cfg_attr(target_os = "dragonfly", allow(deprecated))]
990994
pub fn lstat(path: *const c_char, buf: *mut stat) -> ::c_int;
991995

992996
#[cfg_attr(

0 commit comments

Comments
 (0)