summaryrefslogtreecommitdiff
path: root/misc/screen/patches/patch-ai
blob: 8486f862ac3cc9ff009c7230e7f99146b13cc277 (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
$NetBSD: patch-ai,v 1.1 2002/09/15 06:51:37 kim Exp $

Use utmpx on NetBSD where available.

--- os.h.orig	Tue Jan  8 10:42:33 2002
+++ os.h	Sun Sep 15 01:47:33 2002
@@ -260,9 +260,15 @@
 #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