Networker: remove unneeded assignment
[citadel.git] / citadel / getutline.c
index a567b90132fc954b92d57213f89ebd3c6213e26d..7c6b78e2fb5608de02d39a53b21c90353ad475cc 100644 (file)
@@ -1,15 +1,16 @@
 /*
  * getutline.c: not-quite-compatible replacement for getutline(3)
  * by nathan bryant, feb 1999
- *
- * $Id$
  */
 
 #include "sysdep.h"
 #ifdef HAVE_UTMP_H
 #include <stdio.h>
+#include <sys/types.h>
 #include <utmp.h>
+#ifdef HAVE_PATHS_H
 #include <paths.h>
+#endif
 #include <string.h>
 
 struct utmp *getutline(struct utmp *ut)
@@ -17,7 +18,11 @@ struct utmp *getutline(struct utmp *ut)
   static struct utmp retval;
   FILE *utmp;
 
+#ifdef UTMP_FILE
+  if ((utmp = fopen(UTMP_FILE, "rb")) == NULL)
+#else
   if ((utmp = fopen(_PATH_UTMP, "rb")) == NULL)
+#endif
     return NULL;
 
   do