* sysdeps/gnu/utmpbits.h (_HAVE_UT_PID): New macro.
* login/login.c (login): Test [_HAVE_UT_PID] to use ut_pid member.
* login/logwtmp.c (logwtmp): Likewise.
#if _HAVE_UT_TYPE - 0
copy.ut_type = USER_PROCESS;
#endif
+#if _HAVE_UT_PID - 0
copy.ut_pid = getpid ();
+#endif
/* Seek tty. */
found_tty = tty_name (STDIN_FILENO, &tty, sizeof (_tty));
#define ut_time ut_tv.tv_sec /* Backwards compatibility. */
-/* Tell the user that we have a modern system with UT_HOST, UT_TYPE, UT_ID
- and UT_TV fields. */
+/* Tell the user that we have a modern system with UT_HOST, UT_PID,
+ UT_TYPE, UT_ID and UT_TV fields. */
#define _HAVE_UT_TYPE 1
+#define _HAVE_UT_PID 1
#define _HAVE_UT_ID 1
#define _HAVE_UT_TV 1
#define _HAVE_UT_HOST 1