a couple of comments:
* you need to add asm/termbits.h to the list of files searched for configuration in <winesrc>/configure.ac (no need to add the changes to configure in the merge request, this will be done automatically) (note this is why you don't get the same errors locally as on the pipeline ; but are a good feedback of a compilation on a non Linux box) * it seems overkill to create a dedicated .c file for this (unless you foresee lots of other stuff to go into that file) ; inserting the needed changes in existing functions shoud be ok * please fold your two changes into one (we want every commit to compile without error, obviously the first isn't) * nitpick: existing code returns the output baudrate; yours return the input baudrate. I'd rather keep the same as existing code for consistency. * the fallback to termios ioctl could be improved: * we could have twice the ERR printed in case of real error, * we could have a false positive that will confuse users if termios2 ioctl fails but termios succeeds (very old kernels)