Skip to content

Commit

Permalink
Fix the definition of ino_t on 32-bit FreeBSD 12+
Browse files Browse the repository at this point in the history
Commit 7437d0a erroneously defined it as "ulong" instead of u64.
Nobody noticed the mistake, probably because it was only tested on
64-bit architectures, where those are equivalent.  But it's a problem
now, after #3723 , which switched the standard library to a FreeBSD 12
ABI.

Issue rust-lang/rust#130677
  • Loading branch information
asomers committed Sep 27, 2024
1 parent 09d7aa0 commit 61d2503
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
pub type nlink_t = u16;
// Type of `dev_t` changed from `u32` to `u64` in FreeBSD 12:
pub type dev_t = u32;
// Type of `ino_t` changed from `unsigned int` to `unsigned long` in FreeBSD 12:
// Type of `ino_t` changed from `__uint32_t` to `__uint64_t` in FreeBSD 12:
pub type ino_t = u32;

s! {
Expand Down
2 changes: 1 addition & 1 deletion src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pub type nlink_t = u64;
pub type dev_t = u64;
pub type ino_t = ::c_ulong;
pub type ino_t = u64;
pub type shmatt_t = ::c_uint;

s! {
Expand Down
2 changes: 1 addition & 1 deletion src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pub type nlink_t = u64;
pub type dev_t = u64;
pub type ino_t = ::c_ulong;
pub type ino_t = u64;
pub type shmatt_t = ::c_uint;
pub type kpaddr_t = u64;
pub type kssize_t = i64;
Expand Down
2 changes: 1 addition & 1 deletion src/unix/bsd/freebsdlike/freebsd/freebsd14/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pub type nlink_t = u64;
pub type dev_t = u64;
pub type ino_t = ::c_ulong;
pub type ino_t = u64;
pub type shmatt_t = ::c_uint;
pub type kpaddr_t = u64;
pub type kssize_t = i64;
Expand Down
2 changes: 1 addition & 1 deletion src/unix/bsd/freebsdlike/freebsd/freebsd15/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pub type nlink_t = u64;
pub type dev_t = u64;
pub type ino_t = ::c_ulong;
pub type ino_t = u64;
pub type shmatt_t = ::c_uint;
pub type kpaddr_t = u64;
pub type kssize_t = i64;
Expand Down

0 comments on commit 61d2503

Please sign in to comment.