Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unsafe and platform dependent errno retrieval #789

Merged
merged 1 commit into from
May 20, 2024
Merged

Remove unsafe and platform dependent errno retrieval #789

merged 1 commit into from
May 20, 2024

Conversation

amirbou
Copy link
Contributor

@amirbou amirbou commented May 17, 2024

The recent addition of user ring buffers included calls to *libc::__errno_location().

Apart from requiring an unsafe block, this function might not be available on some targets, such as Android, causing build failures.

Use the portable implementation provided by std::io::Error::last_os_error instead.

The recent addition of user ring buffers included calls to `*libc::__errno_location()`.

Apart from requiring an unsafe block, this function might not be available on some targets,
such as Android, causing build failures.

Use the portable implementation provided by `std::io::Error::last_os_error` instead.
Copy link
Collaborator

@danielocfb danielocfb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I was worried about this case, but failed to recollect in which context I had seen such issues. Looks good to me, thanks!

@danielocfb danielocfb merged commit 8e6cb2e into libbpf:master May 20, 2024
12 checks passed
danielocfb pushed a commit that referenced this pull request May 20, 2024
Add a CHANGELOG entry for pull request #789, which fixed build issues on
Android.

Signed-off-by: Daniel Müller <deso@posteo.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants