diff options
Diffstat (limited to 'miscutils/wall.c')
| -rw-r--r-- | miscutils/wall.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/miscutils/wall.c b/miscutils/wall.c index bb709ee39..50658f457 100644 --- a/miscutils/wall.c +++ b/miscutils/wall.c | |||
| @@ -32,7 +32,7 @@ | |||
| 32 | int wall_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 32 | int wall_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
| 33 | int wall_main(int argc UNUSED_PARAM, char **argv) | 33 | int wall_main(int argc UNUSED_PARAM, char **argv) |
| 34 | { | 34 | { |
| 35 | struct utmp *ut; | 35 | struct utmpx *ut; |
| 36 | char *msg; | 36 | char *msg; |
| 37 | int fd; | 37 | int fd; |
| 38 | 38 | ||
| @@ -46,8 +46,8 @@ int wall_main(int argc UNUSED_PARAM, char **argv) | |||
| 46 | msg = xmalloc_read(fd, NULL); | 46 | msg = xmalloc_read(fd, NULL); |
| 47 | if (ENABLE_FEATURE_CLEAN_UP && argv[1]) | 47 | if (ENABLE_FEATURE_CLEAN_UP && argv[1]) |
| 48 | close(fd); | 48 | close(fd); |
| 49 | setutent(); | 49 | setutxent(); |
| 50 | while ((ut = getutent()) != NULL) { | 50 | while ((ut = getutxent()) != NULL) { |
| 51 | char *line; | 51 | char *line; |
| 52 | if (ut->ut_type != USER_PROCESS) | 52 | if (ut->ut_type != USER_PROCESS) |
| 53 | continue; | 53 | continue; |
| @@ -56,7 +56,7 @@ int wall_main(int argc UNUSED_PARAM, char **argv) | |||
| 56 | free(line); | 56 | free(line); |
| 57 | } | 57 | } |
| 58 | if (ENABLE_FEATURE_CLEAN_UP) { | 58 | if (ENABLE_FEATURE_CLEAN_UP) { |
| 59 | endutent(); | 59 | endutxent(); |
| 60 | free(msg); | 60 | free(msg); |
| 61 | } | 61 | } |
| 62 | return EXIT_SUCCESS; | 62 | return EXIT_SUCCESS; |
