mirror of
https://codeberg.org/fairyglade/ly.git
synced 2026-08-25 15:04:20 +02:00
Retrieve gettimeofday() from sys/time.h
Signed-off-by: AnErrupTion <anerruption@disroot.org>
This commit is contained in:
parent
61f3fadfbf
commit
d40ec873a7
4 changed files with 16 additions and 12 deletions
|
|
@ -477,8 +477,8 @@ fn addUtmpEntry(entry: *Utmp, username: [*:0]const u8, pid: c_int) !void {
|
|||
host[0] = 0;
|
||||
entry.ut_host = host;
|
||||
|
||||
var tv: std.c.timeval = undefined;
|
||||
_ = std.c.gettimeofday(&tv, null);
|
||||
var tv: interop.system_time.timeval = undefined;
|
||||
_ = interop.system_time.gettimeofday(&tv, null);
|
||||
|
||||
entry.ut_tv = .{
|
||||
.tv_sec = @intCast(tv.tv_sec),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue