--- uip/rcvtty.c.orig	2011-06-01 20:53:01.000000000 -0400
+++ uip/rcvtty.c	2011-06-01 20:54:30.000000000 -0400
@@ -23,7 +23,7 @@
 #include <signal.h>
 #include <fcntl.h>
 
-#include <utmp.h>
+#include <utmpx.h>
 
 #ifndef HAVE_GETUTENT
 # ifndef UTMP_FILE
@@ -95,7 +95,7 @@
 #ifdef HAVE_GETUTENT
     struct utmp * utp;
 #else
-    struct utmp ut;
+    struct utmpx ut;
     register FILE *uf;
 #endif
 
@@ -193,8 +193,8 @@
     if ((uf = fopen (UTMP_FILE, "r")) == NULL)
 	exit (RCV_MBX);
     while (fread ((char *) &ut, sizeof(ut), 1, uf) == 1)
-	if (ut.ut_name[0] != 0
-		&& strncmp (user, ut.ut_name, sizeof(ut.ut_name)) == 0) {
+	if (ut.ut_user[0] != 0
+		&& strncmp (user, ut.ut_user, sizeof(ut.ut_user)) == 0) {
 	    strncpy (tty, ut.ut_line, sizeof(ut.ut_line));
 	    alert (tty, md);
 	}
--- uip/slocal.c.orig	2011-06-01 20:54:37.000000000 -0400
+++ uip/slocal.c	2011-06-01 20:55:56.000000000 -0400
@@ -56,7 +56,7 @@
 #include NDBM_HEADER
 #endif
 
-#include <utmp.h>
+#include <utmpx.h>
 
 #ifndef HAVE_GETUTENT
 # ifndef UTMP_FILE
@@ -979,7 +979,7 @@
 static int
 logged_in (void)
 {
-    struct utmp ut;
+    struct utmpx ut;
     FILE *uf;
 
     if (utmped)
@@ -989,8 +989,8 @@
 	return NOTOK;
 
     while (fread ((char *) &ut, sizeof(ut), 1, uf) == 1) {
-	if (ut.ut_name[0] != 0
-	    && strncmp (user, ut.ut_name, sizeof(ut.ut_name)) == 0) {
+	if (ut.ut_user[0] != 0
+	    && strncmp (user, ut.ut_user, sizeof(ut.ut_user)) == 0) {
 	    if (debug)
 		continue;
 	    fclose (uf);
