From 5777e583cd1b493d382866922bf295983f97c1fe Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Fri, 2 Dec 2022 21:52:19 +0100 Subject: [PATCH] Assume exists MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It is required by POSIX.1-2001. Cc: Christian Göttsche Signed-off-by: Alejandro Colomar --- configure.ac | 2 +- lib/defines.h | 19 +++++-------------- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/configure.ac b/configure.ac index 185b85cb..ec9a6841 100644 --- a/configure.ac +++ b/configure.ac @@ -37,7 +37,7 @@ dnl Checks for libraries. dnl Checks for header files. AC_CHECK_HEADERS(crypt.h utmp.h \ - termios.h termio.h sgtty.h sys/ioctl.h syslog.h paths.h \ + termio.h sgtty.h sys/ioctl.h syslog.h paths.h \ utime.h ulimit.h sys/capability.h sys/random.h sys/resource.h \ gshadow.h lastlog.h rpc/key_prot.h netdb.h acl/libacl.h \ attr/libattr.h attr/error_context.h) diff --git a/lib/defines.h b/lib/defines.h index 4be6ecb3..ed2d14de 100644 --- a/lib/defines.h +++ b/lib/defines.h @@ -179,20 +179,11 @@ static inline void memzero(void *ptr, size_t size) # define SEEK_END 2 #endif -#if HAVE_TERMIOS_H -# include -# define STTY(fd, termio) tcsetattr(fd, TCSANOW, termio) -# define GTTY(fd, termio) tcgetattr(fd, termio) -# define TERMIO struct termios -# define USE_TERMIOS -#else /* assumed HAVE_TERMIO_H */ -# include -# include -# define STTY(fd, termio) ioctl(fd, TCSETA, termio) -# define GTTY(fd, termio) ioctl(fd, TCGETA, termio) -# define TEMRIO struct termio -# define USE_TERMIO -#endif +#include +#define STTY(fd, termio) tcsetattr(fd, TCSANOW, termio) +#define GTTY(fd, termio) tcgetattr(fd, termio) +#define TERMIO struct termios +#define USE_TERMIOS /* * Password aging constants