Skip to content

Commit 2ab3172

Browse files
authored
Add #[inline] to fspacectl to prevent linker errors with dylibs and --no-allow-shlib-undefined (#2122)
1 parent 90e3c3a commit 2ab3172

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/fcntl.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -849,6 +849,7 @@ impl SpacectlRange {
849849
/// assert_eq!(buf, b"012\0\0\0\0\0\09abcdef");
850850
/// ```
851851
#[cfg(target_os = "freebsd")]
852+
#[inline] // Delays codegen, preventing linker errors with dylibs and --no-allow-shlib-undefined
852853
pub fn fspacectl(fd: RawFd, range: SpacectlRange) -> Result<SpacectlRange> {
853854
let mut rqsr = libc::spacectl_range {
854855
r_offset: range.0,
@@ -897,6 +898,7 @@ pub fn fspacectl(fd: RawFd, range: SpacectlRange) -> Result<SpacectlRange> {
897898
/// assert_eq!(buf, b"012\0\0\0\0\0\09abcdef");
898899
/// ```
899900
#[cfg(target_os = "freebsd")]
901+
#[inline] // Delays codegen, preventing linker errors with dylibs and --no-allow-shlib-undefined
900902
pub fn fspacectl_all(
901903
fd: RawFd,
902904
offset: libc::off_t,

0 commit comments

Comments
 (0)