Skip to content

Commit 6fad480

Browse files
committed
Auto merge of #2100 - TheDoctor314:gettid, r=JohnTitor
Add gettid() for Linux Fixes #2076
2 parents ec86e5f + 84842b5 commit 6fad480

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

libc-test/build.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2737,6 +2737,9 @@ fn test_linux(target: &str) {
27372737
// assume it's a int instead.
27382738
"getnameinfo" if uclibc => true,
27392739

2740+
// FIXME: This needs musl 1.2.2 or later.
2741+
"gettid" if musl => true,
2742+
27402743
_ => false,
27412744
}
27422745
});

src/unix/linux_like/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1666,6 +1666,7 @@ extern "C" {
16661666
flags: ::c_int,
16671667
) -> ::ssize_t;
16681668
pub fn uname(buf: *mut ::utsname) -> ::c_int;
1669+
pub fn gettid() -> ::pid_t;
16691670
}
16701671

16711672
cfg_if! {

0 commit comments

Comments
 (0)