summaryrefslogtreecommitdiffstats
path: root/term-utils/wall.c
diff options
context:
space:
mode:
authorRuediger Meier2016-12-01 09:52:11 +0100
committerKarel Zak2016-12-07 12:35:24 +0100
commitb4b919fe5e1fc1d346fa6315748d0e0709d02096 (patch)
treee5eba9e27c382d608ab4c93edc1892d88d84e876 /term-utils/wall.c
parentagetty: remove obsolete HAVE_UPDWTMP fallback (diff)
downloadkernel-qcow2-util-linux-b4b919fe5e1fc1d346fa6315748d0e0709d02096.tar.gz
kernel-qcow2-util-linux-b4b919fe5e1fc1d346fa6315748d0e0709d02096.tar.xz
kernel-qcow2-util-linux-b4b919fe5e1fc1d346fa6315748d0e0709d02096.zip
login-utils: switch to utmpx.h
Now the build will fail on many non-Linux systems because utmpx.h is available everywhere but we still use non-POSIX features. We'll fix this next commit. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Diffstat (limited to 'term-utils/wall.c')
-rw-r--r--term-utils/wall.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/term-utils/wall.c b/term-utils/wall.c
index 2c1697c3b..0b7f52245 100644
--- a/term-utils/wall.c
+++ b/term-utils/wall.c
@@ -56,7 +56,7 @@
#include <string.h>
#include <time.h>
#include <unistd.h>
-#include <utmp.h>
+#include <utmpx.h>
#include <getopt.h>
#include <sys/types.h>
#include <grp.h>
@@ -171,7 +171,7 @@ int main(int argc, char **argv)
{
int ch;
struct iovec iov;
- struct utmp *utmpptr;
+ struct utmpx *utmpptr;
char *p;
char line[sizeof(utmpptr->ut_line) + 1];
int print_banner = TRUE;
@@ -235,7 +235,7 @@ int main(int argc, char **argv)
iov.iov_base = mbuf;
iov.iov_len = mbufsize;
- while((utmpptr = getutent())) {
+ while((utmpptr = getutxent())) {
if (!utmpptr->ut_user[0])
continue;
#ifdef USER_PROCESS
@@ -255,7 +255,7 @@ int main(int argc, char **argv)
if ((p = ttymsg(&iov, 1, line, timeout)) != NULL)
warnx("%s", p);
}
- endutent();
+ endutxent();
free(mbuf);
free_group_workspace(group_buf);
exit(EXIT_SUCCESS);