Commit f7a45af6 authored by Niels Möller's avatar Niels Möller

Workaround for utmp/gettimeofday.

parent 87d64412
2013-03-09 Niels Mller <>
* src/unix_process.c (utmp_book_keeping): Don't pass utmp's ut_tv
directly to gettimeofday, since for binary compatibility, utmp may
use a different type.
* src/scm/guile-compat.scm: Use the rdelim module, for the
read-line function.
......@@ -410,7 +410,15 @@ utmp_book_keeping(struct lsh_string *name,
gettimeofday(&entry.ut_tv, NULL); /* Ignore the timezone */
/* On 64-bit, glibc may use a private 32-bit variant of struct
timeval, for binary compatibility. So we can't always pass
&pty->entry directly to gettimeofday. */
struct timeval tv;
gettimeofday(&tv, NULL);
entry.ut_tv.tv_sec = tv.tv_sec;
entry.ut_tv.tv_usec = tv.tv_usec;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment