getrandom: Cannot compile with rust 1.70 and x86_64-unknown-linux-musl target

Hello,

I get the following error :

#0 33.24 error[E0061]: this function takes 3 arguments but 2 arguments were supplied
#0 33.24    --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/getrandom-0.1.16/src/util_libc.rs:113:14
#0 33.24     |
#0 33.24 113 |     let fd = open(path.as_ptr() as *const _, libc::O_RDONLY | libc::O_CLOEXEC);
#0 33.24     |              ^^^^------------------------------------------------------------- an argument of type `u32` is missing
#0 33.24     |
#0 33.24 note: function defined here
#0 33.24    --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.145/src/unix/linux_like/linux/musl/lfs64.rs:112:26
#0 33.24     |
#0 33.24 112 | pub unsafe extern "C" fn open64(
#0 33.24     |                          ^^^^^^
#0 33.24 help: provide the argument
#0 33.24     |
#0 33.24 113 |     let fd = open(path.as_ptr() as *const _, libc::O_RDONLY | libc::O_CLOEXEC, /* u32 */);
#0 33.24     |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#0 33.24 

It works fine with 1.69 .

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 3
  • Comments: 15 (6 by maintainers)

Commits related to this issue

Most upvoted comments

I see exactly the same issue. https://github.com/facebook/buck2/actions/runs/5174587176/jobs/9321086346 for our public link to the failing job. I confirm that pinning libc fixes the issue.