aboutsummaryrefslogtreecommitdiffstats
path: root/editors
diff options
context:
space:
mode:
authorcracauer <cracauer@FreeBSD.org>2010-02-17 06:04:45 +0800
committercracauer <cracauer@FreeBSD.org>2010-02-17 06:04:45 +0800
commitae1f06001a74d8857a082f9d75d36425102b2558 (patch)
treeb74cf8a110a9f2ffbdf02fb30dede1480f315230 /editors
parent2487af683d5da6da03547e361655a265221b62ec (diff)
downloadfreebsd-ports-gnome-ae1f06001a74d8857a082f9d75d36425102b2558.tar.gz
freebsd-ports-gnome-ae1f06001a74d8857a082f9d75d36425102b2558.tar.zst
freebsd-ports-gnome-ae1f06001a74d8857a082f9d75d36425102b2558.zip
Make work with -current's utmpx changes.
I tested on -current/amd64 past the utmpx change and on 8.0-RELEASE-p2/i386 for the old code path. Reviewed: Giorgos Keramidas (maintainer) Approved: Pav Lucistnik (for portmgr) Feature safe: yes
Diffstat (limited to 'editors')
-rw-r--r--editors/emacs22/files/patch-src-filelock.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/editors/emacs22/files/patch-src-filelock.c b/editors/emacs22/files/patch-src-filelock.c
new file mode 100644
index 000000000000..aa91b98f2aeb
--- /dev/null
+++ b/editors/emacs22/files/patch-src-filelock.c
@@ -0,0 +1,34 @@
+--- src/filelock.c.org 2008-01-07 23:30:11.000000000 -0500
++++ src/filelock.c 2010-02-12 17:50:08.000000000 -0500
+@@ -64,7 +64,12 @@
+
+ #ifdef CLASH_DETECTION
+
++#if __FreeBSD_version >= 900007
++#include <utmpx.h>
++#define ut_time ut_tv.tv_sec
++#else
+ #include <utmp.h>
++#endif
+
+ #if !defined (S_ISLNK) && defined (S_IFLNK)
+ #define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
+@@ -253,13 +258,17 @@
+ the first reboot record otherwise.
+ Ignore all reboot records on or before BOOT_TIME.
+ Success is indicated by setting BOOT_TIME to a larger value. */
+-
+ void
+ get_boot_time_1 (filename, newest)
+ char *filename;
+ int newest;
+ {
++#if __FreeBSD_version >= 900007
++ struct utmpx ut, *utp;
++#else
+ struct utmp ut, *utp;
++#endif
++
+ int desc;
+
+ if (filename)