]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
Assume <termios.h> exists
authorAlejandro Colomar <alx@kernel.org>
Fri, 2 Dec 2022 20:52:19 +0000 (21:52 +0100)
committerSerge Hallyn <serge@hallyn.com>
Thu, 15 Dec 2022 22:22:05 +0000 (16:22 -0600)
It is required by POSIX.1-2001.

Cc: Christian Göttsche <cgzones@googlemail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
configure.ac
lib/defines.h

index 185b85cb822280660af6426a183b51e21b977c64..ec9a6841e27f67852a0ee0e98fc21b6fd2017ad0 100644 (file)
@@ -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)
index 4be6ecb34b4cf1e95796d36e1da14ffa34859dab..ed2d14de363facca8867a4696147dec69c21086c 100644 (file)
@@ -179,20 +179,11 @@ static inline void memzero(void *ptr, size_t size)
 # define SEEK_END 2
 #endif
 
-#if HAVE_TERMIOS_H
-# include <termios.h>
-# 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 <sys/ioctl.h>
-# include <termio.h>
-# 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 <termios.h>
+#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