aboutsummaryrefslogtreecommitdiffstats
path: root/net/gnu-radius
diff options
context:
space:
mode:
authorgahr <gahr@FreeBSD.org>2010-01-22 05:51:49 +0800
committergahr <gahr@FreeBSD.org>2010-01-22 05:51:49 +0800
commitdfc3da5b562253f7755b3d4287b7ca3347b48335 (patch)
tree2df87560a61f549a36cec8971f7a4768a1a29489 /net/gnu-radius
parent79291f29fcf0c10c3b7da400a83d6f91c2e6f476 (diff)
downloadfreebsd-ports-gnome-dfc3da5b562253f7755b3d4287b7ca3347b48335.tar.gz
freebsd-ports-gnome-dfc3da5b562253f7755b3d4287b7ca3347b48335.tar.zst
freebsd-ports-gnome-dfc3da5b562253f7755b3d4287b7ca3347b48335.zip
- Fix utmpx on CURRENT
Diffstat (limited to 'net/gnu-radius')
-rw-r--r--net/gnu-radius/Makefile4
-rw-r--r--net/gnu-radius/files/extra-utmpx43
2 files changed, 47 insertions, 0 deletions
diff --git a/net/gnu-radius/Makefile b/net/gnu-radius/Makefile
index 109839098a9e..84a4172c67da 100644
--- a/net/gnu-radius/Makefile
+++ b/net/gnu-radius/Makefile
@@ -54,6 +54,10 @@ EXAMPLE_FILES= README ascend.rw c3620.rw cisco.rw comos.rw config.syntax \
.include <bsd.port.pre.mk>
+.if ${OSVERSION} >= 900007
+EXTRA_PATCHES= ${FILESDIR}/extra-utmpx
+.endif
+
.if defined(WITH_SNMP)
CONFIGURE_ARGS+=--enable-snmp
.endif
diff --git a/net/gnu-radius/files/extra-utmpx b/net/gnu-radius/files/extra-utmpx
new file mode 100644
index 000000000000..17848c511107
--- /dev/null
+++ b/net/gnu-radius/files/extra-utmpx
@@ -0,0 +1,43 @@
+--- radwho/radwho.c.orig 2010-01-21 22:29:51.000000000 +0100
++++ radwho/radwho.c 2010-01-21 22:37:37.000000000 +0100
+@@ -41,7 +41,8 @@
+ int want_rad_record(struct radutmp *rt);
+
+ /* UTMP stuff. Uses utmpx on svr4 */
+-#if defined(__svr4__) || defined(__sgi)
++#include <sys/param.h>
++#if defined(__svr4__) || defined(__sgi) || (defined(__FreeBSD__) && __FreeBSD_version >= 900007)
+ # include <utmpx.h>
+ # include <sys/fcntl.h>
+ # define utmp utmpx
+@@ -49,7 +50,9 @@
+ # define UT_LINESIZE 32
+ # define UT_HOSTSIZE 257
+ # undef UTMP_FILE
++/*
+ # define UTMP_FILE UTMPX_FILE
++*/
+ # undef WTMP_FILE
+ # define WTMP_FILE WTMPX_FILE
+ #else
+@@ -60,13 +63,19 @@
+ # define UT_LINESIZE 32
+ # define UT_HOSTSIZE 64
+ #endif
+-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(bsdi)
++#if (defined(__FreeBSD__) && __FreeBSD_version < 900007) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(bsdi)
+ # ifndef UTMP_FILE
+ # define UTMP_FILE "/var/run/utmp"
+ # endif
+ # define ut_user ut_name
+ #endif
+
++#if defined(__FreeBSD__) && __FreeBSD_version >= 900007
++# define UTMP_FILE "/var/run/utmp"
++# define ut_name ut_user
++# define ut_time ut_tv.tv_sec
++#endif
++
+ #define P_CONSOLE -1 /* Special radutmp type value for local users */
+
+ int fingerd; /* Are we run as fingerd */