$NetBSD: patch-ai,v 1.3 2011/03/14 06:15:23 rumko Exp $ --- os.h.orig 2002-01-08 15:42:33.000000000 +0000 +++ os.h @@ -62,9 +62,6 @@ # undef exit #endif /* sun */ -#ifndef linux /* all done in */ -extern int errno; -#endif /* linux */ #ifndef HAVE_STRERROR /* No macros, please */ #undef strerror @@ -260,9 +257,18 @@ #endif #if defined(UTMPOK) || defined(BUGGYGETLOGIN) -# if defined(SVR4) && !defined(DGUX) && !defined(__hpux) && !defined(linux) +# if (defined(SVR4) && !defined(DGUX) && !defined(__hpux) && !defined(linux)) \ + || (defined(__NetBSD_Version__) && (__NetBSD_Version__ >= 106050000)) \ + || (defined(__DragonFly__) && (__DragonFly_version >= 200902)) # include -# define UTMPFILE UTMPX_FILE +# if defined(__NetBSD__) +# define UTMPFILE _PATH_UTMPX +# define NetBSD_UTMP +# elif defined(__DragonFly__) +# define UTMPFILE _PATH_UTMPX +# else +# define UTMPFILE UTMPX_FILE +# endif # define utmp utmpx # define getutent getutxent # define getutid getutxid