Use /var/run/utmp for now

Musl-libc seems to define that to /dev/null/utmp
This commit is contained in:
sin 2013-09-16 15:58:44 +01:00
parent 713f1cfdb2
commit 450f930c17
1 changed files with 1 additions and 1 deletions

View File

@ -46,7 +46,7 @@ main(int argc, char *argv[])
else
printf("%d min, ", minutes);
if ((ufp = fopen(_PATH_UTMP, "r"))) {
if ((ufp = fopen("/var/run/utmp", "r"))) {
while(fread(&usr, sizeof(usr), 1, ufp) == 1) {
if (!*usr.ut_name || !*usr.ut_line ||
usr.ut_line[0] == '~')