Use libc specific type for architecture specific ioctl defines on Linux. #2550
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.
This PR should fix the type change of some ioctl constants on Linux introduced by #2530.
It does this by adding a
#[doc(hidden)]
type calledIoctl
, which is defined in libc specific modules and used in arch specific modules.However, when doing this I noticed that when I added
TCGETS2
,TCSETS2
, ... in #2508, I unconditionally usedc_ulong
. This is inconsistent with the other ioctl constants formusl
anduclibc
. This PR also changes those to use the libc specific types. However, PR #2508 has already been released in 0.2.107, so technically that is also a semver incompatible change. The impact is limited to new constants introduced in the last release, and only onmusl
anduclibc
targets.So what is more important here? Consistency in the type of ioctl constants, or being very strict with backwards compatibility? If it is the latter, I'll revert
TCGETS2
etc toc_ulong
for this PR.