1
#! /bin/sh /usr/share/dpatch/dpatch-run
2
# 41_wtmp_64bit.dpatch by Petter Reinholdtsen
4
The patch is a copy of sysvinit-2.86-timeval.patch from Fedora. It
5
fixes utmp/wtmp updating of ut_addr_v6 on 64-bit platforms. See bug
6
https://bugzilla.redhat.com/show_bug.cgi?id=176494
9
--- sysvinit-2.86/src/utmp.c.timeval 1999-06-09 07:11:33.000000000 -0400
10
+++ sysvinit-2.86/src/utmp.c 2006-08-09 19:46:26.000000000 -0400
14
struct utsname uname_buf;
19
* Try to open the wtmp file. Note that we even try
20
* this if we have updwtmp() so we can see if the
23
memset(&utmp, 0, sizeof(utmp));
24
#if defined(__GLIBC__)
25
- gettimeofday(&utmp.ut_tv, NULL);
26
+ gettimeofday(&tv, NULL);
27
+ utmp.ut_tv.tv_sec = tv.tv_sec;
28
+ utmp.ut_tv.tv_usec = tv.tv_usec;
39
* Can't do much if UTMP_FILE is not present.
42
strncpy(utmp.ut_id, id, sizeof(utmp.ut_id));
43
#if defined(__GLIBC__)
44
- gettimeofday(&utmp.ut_tv, NULL);
45
+ gettimeofday(&tv, NULL);
46
+ utmp.ut_tv.tv_sec = tv.tv_sec;
47
+ utmp.ut_tv.tv_usec = tv.tv_usec;