Repository navigation
Use the FIONREAD value of each Linux architecture - #104
Merged
Merged
Conversation
available() passed FIONREAD_LINUX (0x541B) to ioctl() on every Linux system. PowerPC, SPARC and Alpha use 0x4004667F, and MIPS uses 0x467F. There ioctl() fails with ENOTTY, available() falls back to poll() and returns 1 instead of the number of pending bytes, so AvailableTest.availableCountsPendingBytes fails on ppc64el.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On Linux, available() always passes 0x541B to ioctl(). PowerPC, SPARC and Alpha use 0x4004667F, and MIPS uses 0x467F, so there ioctl() fails and available() returns 1.
AvailableTest.availableCountsPendingBytesfails on ppc64el: https://ci.debian.net/packages/i/ipcsocket/testing/ppc64el/77338930/This picks the value per architecture. Tested on ppc64el (qemu) and amd64.