From 86a7f18f211af1abda5c855d2674b0fcb53de524 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Thu, 2 Apr 2015 23:03:46 +0200 Subject: *: Switch to POSIX utmpx API UTMP is SVID legacy, UTMPX is mandated by POSIX. Glibc and uClibc have identical layout of UTMP and UTMPX, both of these libc treat _PATH_UTMPX as _PATH_UTMP so from a user-perspective nothing changes except the names of the API entrypoints. Signed-off-by: Bernhard Reutner-Fischer --- init/halt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'init/halt.c') diff --git a/init/halt.c b/init/halt.c index 7974adb17..ad12d9148 100644 --- a/init/halt.c +++ b/init/halt.c @@ -74,7 +74,7 @@ static void write_wtmp(void) { - struct utmp utmp; + struct utmpx utmp; struct utsname uts; /* "man utmp" says wtmp file should *not* be created automagically */ /*if (access(bb_path_wtmp_file, R_OK|W_OK) == -1) { @@ -88,7 +88,7 @@ static void write_wtmp(void) utmp.ut_line[0] = '~'; utmp.ut_line[1] = '~'; /* = strcpy(utmp.ut_line, "~~"); */ uname(&uts); safe_strncpy(utmp.ut_host, uts.release, sizeof(utmp.ut_host)); - updwtmp(bb_path_wtmp_file, &utmp); + updwtmpx(bb_path_wtmp_file, &utmp); } #else #define write_wtmp() ((void)0) -- cgit v1.2.3