Imported Upstream version 302
[ckermit.git] / ckufio.c
index d860757..b5bfaae 100644 (file)
--- a/ckufio.c
+++ b/ckufio.c
@@ -3,12 +3,12 @@
 #define CK_NONBLOCK                     /* See zoutdump() */
 
 #ifdef aegis
-char *ckzv = "Aegis File support, 9.0.215, 13 Jun 2011";
+char *ckzv = "Aegis File support, 9.0.216, 20 Aug 2011";
 #else
 #ifdef Plan9
-char *ckzv = "Plan 9 File support, 9.0.215, 13 Jun 2011";
+char *ckzv = "Plan 9 File support, 9.0.216, 20 Aug 2011";
 #else
-char *ckzv = "UNIX File support, 9.0.215, 13 Jun 2011";
+char *ckzv = "UNIX File support, 9.0.216, 20 Aug 2011";
 #endif /* Plan9 */
 #endif /* aegis */
 /*
@@ -69,7 +69,14 @@ _PROTOTYP( int parser, ( int ) );
 #endif /* OSF13 */
 #endif /* COMMENT */
 
-#include <errno.h>
+#ifndef HPUXPRE65
+#include <errno.h>                     /* Error number symbols */
+#else
+#ifndef ERRNO_INCLUDED
+#include <errno.h>                     /* Error number symbols */
+#endif /* ERRNO_INCLUDED */
+#endif /* HPUXPRE65 */
+
 #include <signal.h>
 
 #ifdef MINIX2
@@ -1062,6 +1069,7 @@ logwtmp __P ((__const char *__ut_line, __const char *__ut_name,
 #endif /* IRIX60 */
 #endif /* SOLARIS */
 #endif /* HAVEUTMPX */
+
 #ifdef HAVEUTMPX
 #include <utmpx.h>
 #else
@@ -1150,7 +1158,11 @@ logwtmp(line, name, host) char *line, *name, *host;
     }
     if (!fstat(wtmpfd, &buf)) {
         ckstrncpy(ut.ut_line, line, sizeof(ut.ut_line));
+#ifdef FREEBSD9
+        ckstrncpy(ut.ut_user, name, sizeof(ut.ut_user));
+#else
         ckstrncpy(ut.ut_name, name, sizeof(ut.ut_name));
+#endif /* FREEBSD9 */
 #ifdef HAVEUTHOST
         /* Not portable */
         ckstrncpy(ut.ut_host, host, sizeof(ut.ut_host));