summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-misc/bsd-games/files/bsd-games-2.17-64bitutmp.patch')
-rw-r--r--games-misc/bsd-games/files/bsd-games-2.17-64bitutmp.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/games-misc/bsd-games/files/bsd-games-2.17-64bitutmp.patch b/games-misc/bsd-games/files/bsd-games-2.17-64bitutmp.patch
new file mode 100644
index 000000000000..3be1b3de074b
--- /dev/null
+++ b/games-misc/bsd-games/files/bsd-games-2.17-64bitutmp.patch
@@ -0,0 +1,21 @@
+About utmpentry.c:
+
+the utmpx structure defines the ut_tv member a little differently on
+64bit hosts so that a 32bit and 64bit structure can be shared. So the
+ut_tv is a custom 32bit structure rather than the native 64bit timeval
+structure. Work around is to assign the submembers instead.
+
+http://bugs.gentoo.org/show_bug.cgi?id=102667
+
+--- bsd-games/dm/utmpentry.c
++++ bsd-games/dm/utmpentry.c
+@@ -291,7 +291,8 @@
+ e->line[sizeof(e->line) - 1] = '\0';
+ (void)strncpy(e->host, up->ut_host, sizeof(up->ut_host));
+ e->name[sizeof(e->host) - 1] = '\0';
+- e->tv = up->ut_tv;
++ e->tv.tv_sec = up->ut_tv.tv_sec;
++ e->tv.tv_usec = up->ut_tv.tv_usec;
+ adjust_size(e);
+ }
+ #endif