Is there a better way than
tc2.c_oflag = casttcflag_t
to bitwise OR c unsigned int fields. tc2.c_oflag is a cuint from termios.h. The or operator does not seem to work on cuints or tcflag_t which is a c "typedef unsigned int". The code I have seems to work but is fragile since a C unsigned int may not always be 32bits.