Skip to content

Commit d019cab

Browse files
author
oech3
committed
stty: Fix stty panic for standard bauds
1 parent 81ee8d1 commit d019cab

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/uucore/src/lib/features/fs.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ impl FileInformation {
138138
any(
139139
target_vendor = "apple",
140140
target_os = "android",
141-
target_os = "freebsd",
142141
target_os = "netbsd",
143142
target_os = "openbsd",
144143
target_os = "illumos",
@@ -152,6 +151,8 @@ impl FileInformation {
152151
)
153152
))]
154153
return self.0.st_nlink.into();
154+
#[cfg(target_os = "freebsd")]
155+
return self.0.st_nlink;
155156
#[cfg(target_os = "aix")]
156157
return self.0.st_nlink.try_into().unwrap();
157158
#[cfg(windows)]
@@ -161,12 +162,11 @@ impl FileInformation {
161162
#[cfg(unix)]
162163
pub fn inode(&self) -> u64 {
163164
#[cfg(all(
164-
not(any(target_os = "freebsd", target_os = "netbsd")),
165+
not(any(target_os = "netbsd")),
165166
target_pointer_width = "64"
166167
))]
167168
return self.0.st_ino;
168169
#[cfg(any(
169-
target_os = "freebsd",
170170
target_os = "netbsd",
171171
not(target_pointer_width = "64")
172172
))]

src/uucore/src/lib/features/fsext.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -446,11 +446,8 @@ unsafe extern "C" {
446446
#[link_name = "getmntinfo"]
447447
fn get_mount_info(mount_buffer_p: *mut *mut StatFs, flags: c_int) -> c_int;
448448

449-
// Rust on FreeBSD uses 11.x ABI for filesystem metadata syscalls.
450-
// Call the right version of the symbol for getmntinfo() result to
451-
// match libc StatFS layout.
452449
#[cfg(target_os = "freebsd")]
453-
#[link_name = "getmntinfo@FBSD_1.0"]
450+
#[link_name = "getmntinfo"]
454451
fn get_mount_info(mount_buffer_p: *mut *mut StatFs, flags: c_int) -> c_int;
455452
}
456453

0 commit comments

Comments
 (0)