aboutsummaryrefslogtreecommitdiff
path: root/editors/emacs21
diff options
context:
space:
mode:
authorMartin Cracauer <cracauer@FreeBSD.org>2010-06-04 23:35:48 +0000
committerMartin Cracauer <cracauer@FreeBSD.org>2010-06-04 23:35:48 +0000
commit00788c4047e3c24c072a54ee4114fd00f7649493 (patch)
tree7c7e7fb1587ebd67f40ba3ec75f36674160c1fde /editors/emacs21
parentcdf3d862bf3fcdd99d451974efece79b5aa216d2 (diff)
downloadports-00788c4047e3c24c072a54ee4114fd00f7649493.tar.gz
ports-00788c4047e3c24c072a54ee4114fd00f7649493.zip
Notes
Diffstat (limited to 'editors/emacs21')
-rw-r--r--editors/emacs21/Makefile4
-rw-r--r--editors/emacs21/files/patch-src:utmpx.c35
2 files changed, 35 insertions, 4 deletions
diff --git a/editors/emacs21/Makefile b/editors/emacs21/Makefile
index 5a5c9df46a8d..db77c22b02b4 100644
--- a/editors/emacs21/Makefile
+++ b/editors/emacs21/Makefile
@@ -60,10 +60,6 @@ LATEST_LINK= emacs21
.include <bsd.port.pre.mk>
-.if ${OSVERSION} > 900007
-BROKEN= fails to build with new utmpx
-.endif
-
.if ${ARCH} == "ia64"
CFLAGS:= ${CFLAGS:C/-O.?/-O0/g}
CONFIGURE_ENV= CFLAGS="${CFLAGS}"
diff --git a/editors/emacs21/files/patch-src:utmpx.c b/editors/emacs21/files/patch-src:utmpx.c
new file mode 100644
index 000000000000..c3988abd2bf6
--- /dev/null
+++ b/editors/emacs21/files/patch-src:utmpx.c
@@ -0,0 +1,35 @@
+--- src/filelock.c.orig 2008-01-07 23:30:11.000000000 -0500
++++ src/filelock.c 2010-02-12 18:40:07.000000000 -0500
+@@ -64,7 +64,13 @@
+
+ #ifdef CLASH_DETECTION
+
++#if __FreeBSD_version >= 900007
++#include <utmpx.h>
++#undef BOOT_TIME
++#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 +259,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)