`pthread_condattr_setclock`function missing for l4re target

Open
#5,628 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
rust

Research direction

Start by locating the pthread_condattr_setclock declarations in libc and comparing their platform and target cfgs with the l4re targets. The report reproduces a missing binding while building parking_lot_core with -Zbuild-std; verify the affected l4re targets and add coverage for the missing declaration. Done when those builds can resolve the function.

Written by the indexing model from the issue text.

Description

C-API-request

rustc 1.101.0-nightly (080cc2714 2026-10-11)
build with -Zbuild-std
for all l4re targets

error[: cannot find function `pthread_condattr_setclock` in crate `libc`
     ╭▸ /cargo/registry/25cdd57fae9f0462/parking_lot_core-0.9.12/src/thread_parker/unix.rs:141:23
     │
 141 │         let r = libc::pthread_condattr_setclock(attr.as_mut_ptr(), libc::CLOCK_MONOTONIC);
     │                       ━━━━━━━━━━━━━━━━━━━━━━━━━ not found in `libc`
     ╰╴
note: similarly named function `pthread_condattr_destroy` defined here
     ╭▸ /cargo/registry/25cdd57fae9f0462/libc-0.2.190/src/unix/mod.rs:1452:5
     │
1452 │     pub fn pthread_condattr_destroy(attr: *mut crate::pthread_condattr_t) -> c_int;
     ╰╴    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
help: a function with a similar name exists
     ╭╴
 141 -         let r = libc::pthread_condattr_setclock(attr.as_mut_ptr(), libc::CLOCK_MONOTONIC);
 141 +         let r = libc::pthread_condattr_destroy(attr.as_mut_ptr(), libc::CLOCK_MONOTONIC);
     ╰╴

For more information about this error, try `rustc --explain E0425`.
error: could not compile `parking_lot_core` (lib) due to 1 previous error
Dominant language
Rust
Stars
2.6k
Forks
1.3k
Avg merge
2d 13h
Merged PRs (30d)
27

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rust-lang/libc

All issues in rust-lang/libc

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.