Cc: Pali Rohár <pali@xxxxxxxxxx> Signed-off-by: Alejandro Colomar <alx.manpages@xxxxxxxxx> --- man2/ioctl_tty.2 | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/man2/ioctl_tty.2 b/man2/ioctl_tty.2 index fd1f3dc25..d0a10a508 100644 --- a/man2/ioctl_tty.2 +++ b/man2/ioctl_tty.2 @@ -772,17 +772,17 @@ Get or set arbitrary baudrate on the serial port. int main(int argc, char *argv[]) { -#ifndef BOTHER +#if !defined BOTHER fprintf(stderr, "BOTHER is unsupported\en"); /* Program may fallback to TCGETS/TCSETS with Bnnn constants */ exit(EXIT_FAILURE); #else /* Declare tio structure, its type depends on supported ioctl */ -#ifdef TCGETS2 +# if defined TCGETS2 struct termios2 tio; -#else +# else struct termios tio; -#endif +# endif int fd, rc; if (argc != 2 && argc != 3 && argc != 4) { @@ -797,11 +797,11 @@ main(int argc, char *argv[]) } /* Get the current serial port settings via supported ioctl */ -#ifdef TCGETS2 +# if defined TCGETS2 rc = ioctl(fd, TCGETS2, &tio); -#else +# else rc = ioctl(fd, TCGETS, &tio); -#endif +# endif if (rc) { perror("TCGETS"); close(fd); @@ -822,11 +822,11 @@ main(int argc, char *argv[]) tio.c_ispeed = (argc == 4) ? atoi(argv[3]) : atoi(argv[2]); /* Set new serial port settings via supported ioctl */ -#ifdef TCSETS2 +# if defined TCSETS2 rc = ioctl(fd, TCSETS2, &tio); -#else +# else rc = ioctl(fd, TCSETS, &tio); -#endif +# endif if (rc) { perror("TCSETS"); close(fd); @@ -834,11 +834,11 @@ main(int argc, char *argv[]) } /* And get new values which were really configured */ -#ifdef TCGETS2 +# if defined TCGETS2 rc = ioctl(fd, TCGETS2, &tio); -#else +# else rc = ioctl(fd, TCGETS, &tio); -#endif +# endif if (rc) { perror("TCGETS"); close(fd); -- 2.33.0