* m4/pty.m4 (gl_FUNC_LOGIN_TTY): Check for the three possible header
files.
+2023-01-21 Bruno Haible <bruno@clisp.org>
+
+ login_tty: Fix detection of declaration (regression 2023-01-19).
+ * m4/pty.m4 (gl_FUNC_LOGIN_TTY): Check for the three possible header
+ files.
+
2023-01-21 Bruno Haible <bruno@clisp.org>
alignasof tests: Rename test file.
-# pty.m4 serial 16
+# pty.m4 serial 17
dnl Copyright (C) 2010-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
[
AC_REQUIRE([gl_PTY_LIB])
+ AC_CHECK_HEADERS_ONCE([utmp.h util.h libutil.h])
gl_saved_libs="$LIBS"
LIBS="$LIBS $PTY_LIB"
- gl_CHECK_FUNCS_ANDROID([login_tty], [[#include <utmp.h>]])
+ gl_CHECK_FUNCS_ANDROID([login_tty], [[
+ #include <sys/types.h>
+ #if HAVE_UTMP_H
+ # include <utmp.h>
+ #endif
+ #if HAVE_UTIL_H
+ # include <util.h>
+ #elif HAVE_LIBUTIL_H
+ # include <libutil.h>
+ #endif
+ ]])
LIBS="$gl_saved_LIBS"
])