Skip to content

Commit 4d4a423

Browse files
committed
Don't forget the cfg_attr
1 parent f6c0ead commit 4d4a423

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/unix/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -699,8 +699,6 @@ extern {
699699
pub fn link(src: *const c_char, dst: *const c_char) -> ::c_int;
700700
pub fn lseek(fd: ::c_int, offset: off_t, whence: ::c_int) -> off_t;
701701
pub fn pathconf(path: *const c_char, name: ::c_int) -> c_long;
702-
#[cfg_attr(all(target_os = "macos", target_arch = "x86"),
703-
link_name = "pause$UNIX2003")]
704702
pub fn pipe(fds: *mut ::c_int) -> ::c_int;
705703
pub fn posix_memalign(memptr: *mut *mut ::c_void,
706704
align: ::size_t,
@@ -1106,6 +1104,8 @@ cfg_if! {
11061104
extern {
11071105
pub fn getsid(pid: pid_t) -> pid_t;
11081106
pub fn truncate(path: *const c_char, length: off_t) -> ::c_int;
1107+
#[cfg_attr(all(target_os = "macos", target_arch = "x86"),
1108+
link_name = "pause$UNIX2003")]
11091109
pub fn pause() -> ::c_int;
11101110

11111111
pub fn readlinkat(dirfd: ::c_int,

0 commit comments

Comments
 (0)