mirror of git://git.suckless.org/sbase
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:
parent
f526ad099f
commit
bb39bc9596
4
who.c
4
who.c
|
@ -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 ||
|
||||
|
|
Loading…
Reference in New Issue