diff --git a/cmake/cmake.h.in b/cmake/cmake.h.in index b6c07d2c..9de1386b 100644 --- a/cmake/cmake.h.in +++ b/cmake/cmake.h.in @@ -21,6 +21,7 @@ #cmakedefine01 HAVE_SYS_SYSCTL_H #cmakedefine01 HAVE_SYS_TYPES_H #cmakedefine01 HAVE_GLOB_H +#cmakedefine01 HAVE_UTMP_H #cmakedefine01 HAVE_FUTIMES #cmakedefine01 HAVE_GETADDRINFO #cmakedefine01 HAVE_POSIX_OPENPT diff --git a/cmake/platforms/unix.cmake b/cmake/platforms/unix.cmake index 156919e7..cb47caf9 100644 --- a/cmake/platforms/unix.cmake +++ b/cmake/platforms/unix.cmake @@ -18,6 +18,7 @@ check_include_file(asm/hwcap.h HAVE_ASM_HWCAP_H) check_include_file(sys/sysctl.h HAVE_SYS_SYSCTL_H) check_include_file(sys/types.h HAVE_SYS_TYPES_H) check_include_file(glob.h HAVE_GLOB_H) +check_include_file(utmp.h HAVE_UTMP_H) check_symbol_exists(futimes "sys/time.h" HAVE_FUTIMES) check_symbol_exists(getaddrinfo "sys/types.h;sys/socket.h;netdb.h" diff --git a/unix/pty.c b/unix/pty.c index 30e48e50..abafa108 100644 --- a/unix/pty.c +++ b/unix/pty.c @@ -13,7 +13,9 @@ #include #include #include +#if HAVE_UTMP_H #include +#endif #include #include #include