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 + 84842b5 commit 6fad480
Show file tree
Hide file tree
Showing 2 changed files with 4 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
1 change: 1 addition & 0 deletions src/unix/linux_like/mod.rs
Expand Up @@ -1666,6 +1666,7 @@ extern "C" {
flags: ::c_int,
) -> ::ssize_t;
pub fn uname(buf: *mut ::utsname) -> ::c_int;
pub fn gettid() -> ::pid_t;
}

cfg_if! {
Expand Down

0 comments on commit 6fad480

Please sign in to comment.