blob: 7e6220fa0e0c4cdba6f92075893e66cec9f0c028 (
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
$NetBSD: patch-aa,v 1.4 2002/11/21 16:18:16 tron Exp $
--- src/wterm.h.orig Sun Mar 5 12:22:32 2000
+++ src/wterm.h Thu Nov 21 17:13:53 2002
@@ -117,6 +117,9 @@
#ifdef UTMP_SUPPORT
# ifdef HAVE_UTMPX_H
# define __USE_GNU
+# ifdef __NetBSD__
+# include <utmp.h>
+# endif
# include <utmpx.h>
# define USE_SYSV_UTMP
# else
@@ -435,10 +438,14 @@
# ifdef _PATH_UTMP
# define UTMP_FILENAME _PATH_UTMP
# else
-# ifdef WTERM_UTMP_FILE
-# define UTMP_FILENAME WTERM_UTMP_FILE
+# ifdef _PATH_UTMPX
+# define UTMP_FILENAME _PATH_UTMPX
# else
-# error define UTMP_FILENAME in config.h
+# ifdef WTERM_UTMP_FILE
+# define UTMP_FILENAME WTERM_UTMP_FILE
+# else
+# error define UTMP_FILENAME in config.h
+# endif
# endif
# endif
# endif
@@ -458,6 +465,7 @@
# define getutid getutxid
# define endutent endutxent
# define pututline pututxline
+# define utmpname utmpxname
# else
# define UTMP struct utmp
# endif
@@ -466,7 +474,11 @@
#ifdef WTMP_SUPPORT
# ifdef HAVE_UTMPX_H /* means we're on Solaris (or Irix?) */
# undef WTMP_FILENAME
-# define WTMP_FILENAME WTMPX_FILE
+# ifdef __NetBSD__
+# define WTMP_FILENAME _PATH_WTMPX
+# else
+# define WTMP_FILENAME WTMPX_FILE
+# endif
# define update_wtmp updwtmpx
# else
# define update_wtmp wterm_update_wtmp
|