summaryrefslogtreecommitdiff
path: root/misc/screen/patches/patch-ai
blob: ae4b7599f3759a33114a381df4d2d8abeddbe7fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
$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