$NetBSD: patch-ab,v 1.1.1.1 1999/01/23 17:00:15 simonb Exp $ --- unix/unix.c.orig Fri Jul 22 08:37:08 1994 +++ unix/unix.c Wed Dec 2 23:17:35 1998 @@ -43,6 +43,11 @@ #include #endif +#if (defined(BSD) && BSD >= 199306) +#include +#include +#endif + #ifdef __linux__ #include #include @@ -276,7 +281,9 @@ void user_name(buf) char *buf; { +#if !(defined(BSD) && BSD >= 199306) extern char *getlogin(); +#endif struct passwd *pwline; register char *p; @@ -314,7 +321,10 @@ user[i] = '\0'; if (i == 0) { - char *login = (char *) getlogin(); +#if !(defined(BSD) && BSD >= 199306) + extern char *getlogin(); +#endif + char *login = getlogin(); if (login != NULL) (void) strcpy (user, login);