Skip to content

Commit f024fe7

Browse files
committed
Trying to fix for i686-apple
Error was "bad pthread_cancel function pointer: rust: 8362822 (0x7f9b46) != c 8358779 (0x7f8b7b)"
1 parent fcc8237 commit f024fe7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/unix/bsd/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,8 @@ extern {
491491
oldset: *mut sigset_t) -> ::c_int;
492492
pub fn sem_open(name: *const ::c_char, oflag: ::c_int, ...) -> *mut sem_t;
493493
pub fn getgrnam(name: *const ::c_char) -> *mut ::group;
494+
#[cfg_attr(all(target_os = "macos", target_arch = "x86"),
495+
link_name = "pthread_cancel$UNIX2003")]
494496
pub fn pthread_cancel(thread: ::pthread_t) -> ::c_int;
495497
pub fn pthread_kill(thread: ::pthread_t, sig: ::c_int) -> ::c_int;
496498
pub fn sem_unlink(name: *const ::c_char) -> ::c_int;

0 commit comments

Comments
 (0)