1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-22 00:35:15 +00:00

Unbreak after utmp changes.

Maintainer timeout, I mailed this in February when I fixed emacs22.

Tested on amd64/current and i386/8-stable.
This commit is contained in:
Martin Cracauer 2010-06-04 23:35:48 +00:00
parent cdf3d862bf
commit 00788c4047
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=255737
2 changed files with 35 additions and 4 deletions

View File

@ -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}"

View File

@ -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)