aboutsummaryrefslogtreecommitdiff
path: root/comms/mgetty+sendfax
diff options
context:
space:
mode:
authorJimmy Olgeni <olgeni@FreeBSD.org>2011-11-20 14:36:57 +0000
committerJimmy Olgeni <olgeni@FreeBSD.org>2011-11-20 14:36:57 +0000
commited24810611c7d3bbaed9922865ef561bee958328 (patch)
treecaf1ed57b3f013bba8addbce478e162bdcfc8d4d /comms/mgetty+sendfax
parent3432db1c29e119b7add25fdfdbc15d60e2048a38 (diff)
downloadports-ed24810611c7d3bbaed9922865ef561bee958328.tar.gz
ports-ed24810611c7d3bbaed9922865ef561bee958328.zip
Notes
Diffstat (limited to 'comms/mgetty+sendfax')
-rw-r--r--comms/mgetty+sendfax/Makefile4
-rw-r--r--comms/mgetty+sendfax/files/patch-mg__utmp.h46
-rw-r--r--comms/mgetty+sendfax/files/patch-utmp.c20
3 files changed, 66 insertions, 4 deletions
diff --git a/comms/mgetty+sendfax/Makefile b/comms/mgetty+sendfax/Makefile
index e381a2587086..ec1b579b9266 100644
--- a/comms/mgetty+sendfax/Makefile
+++ b/comms/mgetty+sendfax/Makefile
@@ -70,10 +70,6 @@ MAKE_JOBS_UNSAFE= yes
.include <bsd.port.pre.mk>
-.if ${OSVERSION} > 900007
-BROKEN= fails to build with new utmpx
-.endif
-
CFLAGS+= -DAUTO_PPP
.if defined(WITH_FIDO) && ${WITH_FIDO:L} != no
CFLAGS+= -DFIDO
diff --git a/comms/mgetty+sendfax/files/patch-mg__utmp.h b/comms/mgetty+sendfax/files/patch-mg__utmp.h
new file mode 100644
index 000000000000..fdc57b41efe6
--- /dev/null
+++ b/comms/mgetty+sendfax/files/patch-mg__utmp.h
@@ -0,0 +1,46 @@
+
+$FreeBSD$
+
+--- 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 */
diff --git a/comms/mgetty+sendfax/files/patch-utmp.c b/comms/mgetty+sendfax/files/patch-utmp.c
new file mode 100644
index 000000000000..54d09cce09e0
--- /dev/null
+++ b/comms/mgetty+sendfax/files/patch-utmp.c
@@ -0,0 +1,20 @@
+
+$FreeBSD$
+
+--- utmp.c.orig
++++ utmp.c
+@@ -1,4 +1,4 @@
+-#ident "$Id: utmp.c,v 4.4 2001/12/17 22:43:24 gert Exp $ Copyright (c) Gert Doering"
++static char sccsid[] = "$Id: utmp.c,v 4.4 2001/12/17 22:43:24 gert Exp $ Copyright (c) Gert Doering";
+
+ /* some parts of the code (writing of the utmp entry)
+ * is based on the "getty kit 2.0" by Paul Sutcliffe, Jr.,
+@@ -58,7 +58,7 @@
+ * [NB: If we wanted to set UT_INIT, it would have to be an entry with
+ * empty ut_name and ut_host]
+ */
+-#if defined(__FreeBSD__) || defined(__NetBSD__)
++#if (defined(__FreeBSD__) && (__FreeBSD_version < 900007)) || defined(__NetBSD__)
+ struct utmp utmp;
+ extern void login _PROTO(( struct utmp * utmp ));
+