[hackers] [sbase] Use /var/run/utmp for now || sin

From: <git_AT_suckless.org>
Date: Sat, 05 Oct 2013 16:29:36 +0200

commit bb39bc9596a73f18b98fb6188b54661b357a4127
Author: sin <sin_AT_2f30.org>
Date: Sun Sep 29 19:26:08 2013 +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.

diff --git a/who.c b/who.c
index 50b686a..e098c99 100644
--- a/who.c
+++ b/who.c
_AT_@ -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 ||
Received on Sat Oct 05 2013 - 16:29:36 CEST

This archive was generated by hypermail 2.3.0 : Sat Oct 05 2013 - 16:36:47 CEST