feat: made unix-loader more stable on FreeBSD
This commit is contained in:
@@ -4,3 +4,5 @@ edition = "2024"
|
||||
version.workspace = true
|
||||
|
||||
[dependencies]
|
||||
libc = "0.2"
|
||||
errno = "0.3"
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
fn main() {
|
||||
println!("Hello, world!");
|
||||
|
||||
#[cfg(target_os = "freebsd")]
|
||||
unsafe {
|
||||
let sem = libc::sem_open(c"/libcrypto".as_ptr(), 0);
|
||||
libc::sem_post(sem);
|
||||
}
|
||||
|
||||
println!("Hello, world!");
|
||||
unsafe { println!("\n{}\n", libc::getpid()) };
|
||||
|
||||
loop {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user