pkgsrc/comms/mgetty+sendfax/patches/patch-ak
fredb 6b9c6cc6b6 Add support for /var/run/utmpx on NetBSD 1.6B or newer, including
building on a suggestion by Gert Doering, filling ut_pid with the pid
of the uucp-style lock holder. This should fix PR pkg/12261, although
you will need today's "w" to see any results. Bump PKGREVSION.
2003-02-26 21:45:43 +00:00

35 lines
881 B
Text

$NetBSD: patch-ak,v 1.1 2003/02/26 21:45:44 fredb Exp $
--- mg_utmp.h.orig 1997-01-12 08:53:42.000000000 -0600
+++ mg_utmp.h
@@ -4,6 +4,22 @@
* highly SysV / BSD dependent
*/
+#if __NetBSD_Version__ >= 106020000 /* NetBSD >= 1.6B has SVR4-style utmpx */
+# define NETBSD_UTMPX
+# include <util.h> /* for loginx */
+# define login loginx
+# define utmp utmpx
+# define getutent getutxent
+# define getutid getutxid
+# define pututline pututxline
+# define setutent setutxent
+# define endutent endutxent
+
+# define UT_INIT INIT_PROCESS
+# define UT_LOGIN LOGIN_PROCESS
+# define UT_USER USER_PROCESS
+
+#else
#if !defined(sunos4) && !defined(BSD) && !defined(ultrix) /* SysV style */
#ifdef SVR4 /* on SVR4, use extended utmpx file */
@@ -42,6 +58,7 @@
#define UT_USER 2
#endif /* SysV vs. BSD */
+#endif /* NetBSD with utmpx */
/* prototypes */