Skip to content

Cannot compile with rust 1.70 and x86_64-unknown-linux-musl target #363

Closed
@nicolaspernoud

Description

@nicolaspernoud

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 .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions