ubase

suckless linux base utils
git clone git://git.2f30.org/ubase
Log | Files | Refs | README | LICENSE

commit 450f930c175d906420fb203d38036eb7e1e80b6d
parent 713f1cfdb2979a1d875deacd953f9826e0470a78
Author: sin <sin@2f30.org>
Date:   Mon, 16 Sep 2013 15:58:44 +0100

Use /var/run/utmp for now

Musl-libc seems to define that to /dev/null/utmp

Diffstat:
Muptime.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/uptime.c b/uptime.c @@ -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] == '~')