aboutsummaryrefslogtreecommitdiffstats
path: root/deskutils
diff options
context:
space:
mode:
authormiwi <miwi@FreeBSD.org>2010-01-27 09:03:35 +0800
committermiwi <miwi@FreeBSD.org>2010-01-27 09:03:35 +0800
commit33c74169268e9463f5ff9a13dbb6d79e12692049 (patch)
tree050da151c7b4e6346635c3fbcc17ad00ba3c7e6b /deskutils
parent8a0c0da4c5190d42598edcea3e43c589aa7f15de (diff)
downloadfreebsd-ports-gnome-33c74169268e9463f5ff9a13dbb6d79e12692049.tar.gz
freebsd-ports-gnome-33c74169268e9463f5ff9a13dbb6d79e12692049.tar.zst
freebsd-ports-gnome-33c74169268e9463f5ff9a13dbb6d79e12692049.zip
- Fix build on HEAD
PR: 143236 Submitted by: Rob Farmer <rfarmer@predatorlabs.net> Reviewed by: ed@
Diffstat (limited to 'deskutils')
-rw-r--r--deskutils/plan/Makefile7
-rw-r--r--deskutils/plan/files/utmpx-src-daemon.c33
2 files changed, 39 insertions, 1 deletions
diff --git a/deskutils/plan/Makefile b/deskutils/plan/Makefile
index c03f8ecba7e8..25361c012cf4 100644
--- a/deskutils/plan/Makefile
+++ b/deskutils/plan/Makefile
@@ -23,6 +23,11 @@ MAN4= plan.4
MAKE_ENV+= DATADIR=${DATADIR} EXAMPLESDIR=${EXAMPLESDIR}
+.include <bsd.port.pre.mk>
+.if ${OSVERSION} > 900006
+EXTRA_PATCHES= ${PATCHDIR}/utmpx-src-daemon.c
+.endif
+
do-install:
@${MKDIR} ${EXAMPLESDIR}
@@ -54,4 +59,4 @@ post-install:
@${MKDIR} ${DATADIR}/netplan.dir
.endif
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/deskutils/plan/files/utmpx-src-daemon.c b/deskutils/plan/files/utmpx-src-daemon.c
new file mode 100644
index 000000000000..4d5a8accf999
--- /dev/null
+++ b/deskutils/plan/files/utmpx-src-daemon.c
@@ -0,0 +1,33 @@
+--- daemon.c.orig 2010-01-25 17:34:06.000000000 -0800
++++ daemon.c 2010-01-25 17:38:29.000000000 -0800
+@@ -42,7 +42,7 @@
+ #ifdef __EMX__
+ #include <io.h>
+ #else
+-#include <utmp.h>
++#include <utmpx.h>
+ #endif
+ #ifdef AIXV3
+ struct utmp *getutent();
+@@ -266,7 +266,7 @@
+ refresh_lock(resolve_tilde(PLANDLOCK));
+ logged_in = FALSE;
+ if (pw) {
+-#if defined(SUN) || defined(BSD) || defined(__FreeBSD__)
++#if defined(SUN)
+ struct utmp ut;
+ int fd;
+ int l;
+@@ -289,9 +289,9 @@
+ logged_in = TRUE;
+ #else
+ short pid = getpid();
+- struct utmp *u;
+- setutent();
+- while ((u = getutent()))
++ struct utmpx *u;
++ setutxent();
++ while ((u = getutxent()))
+ if (u->ut_type == USER_PROCESS &&
+ u->ut_pid != pid &&
+ !strncmp(pw->pw_name, u->ut_user, 8)) {