diff options
-rw-r--r-- | getty.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -517,11 +517,13 @@ void update_utmp(line) | |||
517 | char *line; | 517 | char *line; |
518 | { | 518 | { |
519 | struct utmp ut; | 519 | struct utmp ut; |
520 | time_t t; | ||
521 | int mypid = getpid(); | 520 | int mypid = getpid(); |
522 | long time(); | 521 | long time(); |
523 | long lseek(); | 522 | long lseek(); |
523 | #ifndef __UCLIBC__ | ||
524 | time_t t; | ||
524 | struct utmp *utp; | 525 | struct utmp *utp; |
526 | #endif | ||
525 | 527 | ||
526 | #if ! (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)) | 528 | #if ! (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)) |
527 | struct flock lock; | 529 | struct flock lock; |
@@ -536,7 +538,7 @@ char *line; | |||
536 | * entry in the utmp file. | 538 | * entry in the utmp file. |
537 | */ | 539 | */ |
538 | 540 | ||
539 | #ifdef __linux__ | 541 | #ifndef __UCLIBC__ |
540 | utmpname(_PATH_UTMP); | 542 | utmpname(_PATH_UTMP); |
541 | setutent(); | 543 | setutent(); |
542 | while ((utp = getutent()) | 544 | while ((utp = getutent()) |
@@ -571,8 +573,8 @@ char *line; | |||
571 | { | 573 | { |
572 | int ut_fd; | 574 | int ut_fd; |
573 | 575 | ||
574 | if ((ut_fd = open(UTMP_FILE, 2)) < 0) { | 576 | if ((ut_fd = open(_PATH_WTMP, 2)) < 0) { |
575 | error("%s: open for update: %m"), UTMP_FILE; | 577 | error("%s: open for update: %m"), _PATH_WTMP; |
576 | } else { | 578 | } else { |
577 | long ut_size = sizeof(ut); /* avoid nonsense */ | 579 | long ut_size = sizeof(ut); /* avoid nonsense */ |
578 | 580 | ||