summaryrefslogtreecommitdiffstats
path: root/comms/mgetty+sendfax/files/patch-mg__utmp.h
blob: 58651005c4ceceb5839ced8976598ec23b7feb61 (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
--- mg_utmp.h.orig
+++ mg_utmp.h
@@ -1,4 +1,4 @@
-#ident "$Id: mg_utmp.h,v 4.1 1997/01/12 14:53:42 gert Exp $ Copyright (c) Gert Doering"
+static char sccs_mg_utmp[] = "$Id: mg_utmp.h,v 4.1 1997/01/12 14:53:42 gert Exp $ Copyright (c) Gert Doering";
 
 /* definitions for utmp reading / writing routines,
  * highly SysV / BSD dependent
@@ -31,6 +31,25 @@
 
 #else						 /* SunOS or generic BSD */
 
+#if defined(__FreeBSD__) && (__FreeBSD_version >= 900007)
+
+# include <utmpx.h>
+# define utmp		utmpx
+# define getutent	getutxent
+# define getutid	getutxid
+# define getutline	getutxline
+# define pututline	pututxline
+# define setutent	setutxent
+# define endutent	endutxent
+# define ut_time	ut_tv
+# define ut_name	ut_user
+       
+#define UT_INIT		INIT_PROCESS
+#define UT_LOGIN	LOGIN_PROCESS
+#define UT_USER		USER_PROCESS
+
+#else
+
 #include <sys/types.h>
 #include <utmp.h>
 
@@ -41,6 +60,8 @@
 #define UT_LOGIN	1
 #define UT_USER		2
 
+#endif						/* __FreeBSD_version */
+
 #endif						/* SysV vs. BSD */
 
 /* prototypes */
OpenPOWER on IntegriCloud