Skip to content

when linking libc, expose libc version in builtin import, and only call c functions in std library when linking libc whose version is known to have the function #397

@tiehuis

Description

@tiehuis

getRandomBytes uses getrandom from libc. This however is fairly new, requiring the 2.25 version of glibc to compiler. If not present, this will cause a link error.

https://github.com/andrewrk/tetris fails to compile for example using an older glibc 2.23.

We could just use the syscall directly which would stop this glibc requirement. A fallback to /dev/urandom would probably be good as well. Would need to check some other source for a good set of fallback procedures.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementSolving this issue will likely involve adding new logic or components to the codebase.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions