Skip to content

Commit

Permalink
Auto merge of #2100 - TheDoctor314:gettid, r=JohnTitor
Browse files Browse the repository at this point in the history
Add gettid() for Linux

Fixes #2076
  • Loading branch information
bors committed Mar 4, 2021
2 parents ec86e5f + b719be4 commit 3a7135f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libc-test/build.rs
Expand Up @@ -2737,6 +2737,9 @@ fn test_linux(target: &str) {
// assume it's a int instead.
"getnameinfo" if uclibc => true,

// FIXME: This needs musl 1.2.2 or later.
"gettid" if musl => true,

_ => false,
}
});
Expand Down
2 changes: 2 additions & 0 deletions src/unix/linux_like/android/mod.rs
Expand Up @@ -2809,6 +2809,8 @@ extern "C" {
pub fn regfree(preg: *mut ::regex_t);

pub fn android_set_abort_message(msg: *const ::c_char);

pub fn gettid() -> ::pid_t;
}

cfg_if! {
Expand Down
2 changes: 2 additions & 0 deletions src/unix/linux_like/linux/mod.rs
Expand Up @@ -3594,6 +3594,8 @@ extern "C" {
outbytesleft: *mut ::size_t,
) -> ::size_t;
pub fn iconv_close(cd: iconv_t) -> ::c_int;

pub fn gettid() -> ::pid_t;
}

cfg_if! {
Expand Down

0 comments on commit 3a7135f

Please sign in to comment.