Skip to content

Fix the ioctl configure check on bionic - #137198

Merged
akoeplinger merged 2 commits into
dotnet:mainfrom
virzak:fix/bionic-ioctl-check
Nov 11, 2026
Merged

akoeplinger merged 2 commits into
dotnet:mainfrom
virzak:fix/bionic-ioctl-check

Conversation

@virzak

@virzak virzak commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Bionic declares a second, overloaded ioctl (bits/ioctl.h, unless BIONIC_IOCTL_NO_SIGNEDNESS_OVERLOAD is defined), so check_symbol_exists(ioctl ...) can't take its address and HAVE_IOCTL is 0. SystemNative_GetWindowSize then always returns ENOTSUP, and on linux-bionic Console.WindowWidth/WindowHeight fall back to terminfo's 80x24 and never follow a resize. PowerShell's line editor draws in the wrong row as a result.

Defining BIONIC_IOCTL_NO_SIGNEDNESS_OVERLOAD for this check only hides the overload. Verified with a 10.0.13 source build on Android (Termux): the window size now matches stty size and follows the soft keyboard.

Bionic declares a second, overloaded ioctl, so check_symbol_exists can't take
its address and HAVE_IOCTL ends up 0. SystemNative_GetWindowSize then always
fails, and Console.WindowWidth/Height fall back to terminfo's 80x24 on
linux-bionic.
@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Nov 9, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
12 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/runtime-infrastructure
See info in area-owners.md if you want to be subscribed.

@akoeplinger

Copy link
Copy Markdown
Member

check_symbol_exists is normally preferred over check_function_exists, I wonder if we should just set BIONIC_IOCTL_NO_SIGNEDNESS_OVERLOAD for this detection?

@virzak

virzak commented Nov 10, 2026

Copy link
Copy Markdown
Contributor Author

Good idea, done. Same result on Android (HAVE_IOCTL=1).

@akoeplinger

Copy link
Copy Markdown
Member

/ba-g unrelated failures on non-bionic jobs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-Infrastructure community-contribution Indicates that the PR has been added by a community member

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants