pkgsrc/misc/screen/patches/patch-ai
2005-11-08 12:58:47 +00:00

32 lines
905 B
Text

$NetBSD: patch-ai,v 1.2 2005/11/08 12:58:47 joerg 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 <errno.h> */
-extern int errno;
-#endif /* linux */
#ifndef HAVE_STRERROR
/* No macros, please */
#undef strerror
@@ -260,9 +257,15 @@ extern int errno;
#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))
# include <utmpx.h>
-# define UTMPFILE UTMPX_FILE
+# ifdef __NetBSD__
+# define UTMPFILE _PATH_UTMPX
+# define NetBSD_UTMP
+# else
+# define UTMPFILE UTMPX_FILE
+# endif
# define utmp utmpx
# define getutent getutxent
# define getutid getutxid