]> git.ipfire.org Git - thirdparty/chrony.git/commit
sys_linux: fix building with older compilers and some archs master
authorMiroslav Lichvar <mlichvar@redhat.com>
Wed, 22 Oct 2025 08:53:11 +0000 (10:53 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Wed, 22 Oct 2025 12:03:44 +0000 (14:03 +0200)
commit3c39afa13c769452d4c340bfc987e229b7c9caeb
tree39e41e7c2923ce7d8dc59049993dd9225acffaee
parent03875f1ea5c4c0eeeb30a7d1fc5fdd53236f4ac2
sys_linux: fix building with older compilers and some archs

The recent replacement of <termios.h> with <linux/termios.h> to get
TCGETS2 seems to work only with compilers (or C standards) that allow
the same structure to be defined multiple times. There is a conflict
between <sys/ioctl.h> and <linux/termios.h>.

Another problem is that TCGETS2 is not used on some archs like ppc64.

Switch back to <termios.h> and move TCGETS2 to a list in a separate
file where it can be compiled without <sys/ioctl.h>.

Fixes: 03875f1ea5c4 ("sys_linux: allow ioctl(TCGETS2) in seccomp filter")
configure
sys_linux.c
sys_linux_scmp.c [new file with mode: 0644]
sys_linux_scmp.h [new file with mode: 0644]