[PATCH v4] linux/termio: remove <termio.h> and struct termio
H. Peter Anvin
hpa@zytor.com
Wed May 7 13:38:16 GMT 2025
On May 7, 2025 1:01:40 AM PDT, Andreas Schwab <schwab@suse.de> wrote:
>On Apr 27 2025, Florian Weimer wrote:
>
>> <https://github.com/llvm/llvm-project/pull/137403#issuecomment-2832595303>
>>
>> I assume TCGETA etc. are only used with the legacy interface?
>
>It's still broken:
>
>In file included from /usr/include/asm/ioctl.h:12,
> from /usr/include/asm/ioctls.h:5,
> from /usr/include/bits/ioctls.h:23,
> from /usr/include/sys/ioctl.h:26,
> from /usr/include/sys/mount.h:28,
> from ../../../../libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp:64:
>../../../../libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp:765:27: error: invalid application of ‘sizeof’ to incomplete type ‘__sanitizer::termio’
> 765 | unsigned IOCTL_TCGETA = TCGETA;
> | ^~~~~~
>../../../../libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp:769:27: error: invalid application of ‘sizeof’ to incomplete type ‘__sanitizer::termio’
> 769 | unsigned IOCTL_TCSETA = TCSETA;
> | ^~~~~~
>../../../../libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp:770:28: error: invalid application of ‘sizeof’ to incomplete type ‘__sanitizer::termio’
> 770 | unsigned IOCTL_TCSETAF = TCSETAF;
> | ^~~~~~~
>../../../../libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp:771:28: error: invalid application of ‘sizeof’ to incomplete type ‘__sanitizer::termio’
> 771 | unsigned IOCTL_TCSETAW = TCSETAW;
> | ^~~~~~~
>make[4]: *** [Makefile:627: sanitizer_platform_limits_posix.lo] Error 1
>make[4]: Leaving directory '/home/abuild/rpmbuild/BUILD/gcc16-testresults-16.0.0+git433-build/gcc-16.0.0+git433/obj-powerpc64le-suse-linux/powerpc64le-suse-linux/libsanitizer/sanitizer_common'
>
Yes, I believe my comment on the bug report is the right way to fix it.
ioctl is a kernel interface, and the types should be picked up from the kernel headers.
More information about the Libc-alpha
mailing list