Skip to content

Commit 91ef172

Browse files
committed
Merge pull request #207 from alexcrichton/android-select
Add select() to Android bindings
2 parents 07a9206 + 993ea7e commit 91ef172

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/unix/mod.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -584,6 +584,16 @@ extern {
584584
#[cfg_attr(all(target_os = "macos", target_arch = "x86"),
585585
link_name = "poll$UNIX2003")]
586586
pub fn poll(fds: *mut pollfd, nfds: nfds_t, timeout: ::c_int) -> ::c_int;
587+
#[cfg_attr(all(target_os = "macos", target_arch = "x86_64"),
588+
link_name = "select$1050")]
589+
#[cfg_attr(all(target_os = "macos", target_arch = "x86"),
590+
link_name = "select$UNIX2003")]
591+
#[cfg_attr(target_os = "netbsd", link_name = "__select50")]
592+
pub fn select(nfds: ::c_int,
593+
readfs: *mut fd_set,
594+
writefds: *mut fd_set,
595+
errorfds: *mut fd_set,
596+
timeout: *mut timeval) -> ::c_int;
587597
}
588598

589599
// TODO: get rid of this #[cfg(not(...))]
@@ -648,16 +658,6 @@ extern {
648658
pub fn sigdelset(set: *mut sigset_t, signum: ::c_int) -> ::c_int;
649659
#[cfg_attr(target_os = "netbsd", link_name = "__sigismember14")]
650660
pub fn sigismember(set: *const sigset_t, signum: ::c_int) -> ::c_int;
651-
#[cfg_attr(all(target_os = "macos", target_arch = "x86_64"),
652-
link_name = "select$1050")]
653-
#[cfg_attr(all(target_os = "macos", target_arch = "x86"),
654-
link_name = "select$UNIX2003")]
655-
#[cfg_attr(target_os = "netbsd", link_name = "__select50")]
656-
pub fn select(nfds: ::c_int,
657-
readfs: *mut fd_set,
658-
writefds: *mut fd_set,
659-
errorfds: *mut fd_set,
660-
timeout: *mut timeval) -> ::c_int;
661661
#[cfg_attr(all(target_os = "macos", target_arch = "x86_64"),
662662
link_name = "pselect$1050")]
663663
#[cfg_attr(all(target_os = "macos", target_arch = "x86"),

0 commit comments

Comments
 (0)