$NetBSD: patch-ac,v 1.9 2025/10/20 18:32:10 vins Exp $ * Check for stropts.h header and updwtmpx func. * Check for ut_session in struct utmpx. --- autoconf/configure.in.orig 2003-03-07 02:32:27.000000000 +0000 +++ autoconf/configure.in @@ -393,6 +393,7 @@ AC_CHECK_HEADERS( \ sys/ioctl.h \ sys/select.h \ sys/sockio.h \ + sys/stropts.h \ sys/strredir.h \ sys/time.h \ utmp.h \ @@ -588,6 +589,7 @@ AC_CHECK_FUNCS( \ on_exit \ nanosleep \ updwtmp \ + updwtmpx \ ttyslot \ ) dnl# Note: On NetBSD, openpty() exists in libutil. Don't pull it in @@ -649,6 +651,14 @@ rxvt_cv_struct_utmpx_host=yes, rxvt_cv_s if test x$rxvt_cv_struct_utmpx_host = xyes; then AC_DEFINE(HAVE_UTMPX_HOST, 1, Define if struct utmpx contains ut_host) fi +AC_CACHE_CHECK(for session in utmpx struct, rxvt_cv_struct_utmpx_session, +[AC_TRY_COMPILE([#include +#include ], +[struct utmpx utx; utx.ut_session;], +rxvt_cv_struct_utmpx_session=yes, rxvt_cv_struct_utmpx_session=no)]) +if test x$rxvt_cv_struct_utmpx_session = xyes; then + AC_DEFINE(HAVE_UTMPX_SESSION, 1, Define if struct utmpx contains ut_session) +fi ) dnl# AC_CHECK_HEADER(utmpx.h