Skip to content

Commit ca49cd8

Browse files
committed
Add #[inline] to memfd_create to prevent linker errors with dylibs and --no-allow-shlib-undefined
1 parent ee91423 commit ca49cd8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/sys/memfd.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ libc_bitflags!(
4040
/// For more information, see [`memfd_create(2)`].
4141
///
4242
/// [`memfd_create(2)`]: https://man7.org/linux/man-pages/man2/memfd_create.2.html
43+
#[inline] // Delays codegen, preventing linker errors with dylibs and --no-allow-shlib-undefined
4344
pub fn memfd_create(name: &CStr, flags: MemFdCreateFlag) -> Result<OwnedFd> {
4445
let res = unsafe {
4546
cfg_if! {

0 commit comments

Comments
 (0)