commit bb39bc9596a73f18b98fb6188b54661b357a4127
parent f526ad099f35bd6a17af6ac23e2844bfb3fe4372
Author: sin <sin@2f30.org>
Date: Sun, 29 Sep 2013 19:26:08 +0100
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.
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/who.c b/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 ||