Use /var/run/utmp for now

Musl-libc seems to define that to /dev/null/utmp for a good
reason.  Use /var/run/utmp for now until we find a better way
to deal with this.
This commit is contained in:
sin 2013-09-29 19:26:08 +01:00
parent f526ad099f
commit bb39bc9596
1 changed files with 2 additions and 2 deletions

4
who.c
View File

@ -41,8 +41,8 @@ main(int argc, char **argv)
if (argc > 0)
usage();
if (!(ufp = fopen(_PATH_UTMP, "r")))
eprintf("who: '%s':", _PATH_UTMP);
if (!(ufp = fopen("/var/run/utmp", "r")))
eprintf("who: '%s':", "/var/run/utmp");
while(fread(&usr, sizeof(usr), 1, ufp) == 1) {
if (!*usr.ut_name || !*usr.ut_line ||