aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-08-22 00:10:00 +0000
committerEric Andersen <andersen@codepoet.org>2001-08-22 00:10:00 +0000
commita07c9026486043359b84a16576cccc635075c300 (patch)
tree457698d5de2c9f4ea02e5ba5788fe9a48517b1a5
parent75220b55ffabfc93512a380d3a90fe21333a6ff9 (diff)
downloadbusybox-w32-a07c9026486043359b84a16576cccc635075c300.tar.gz
busybox-w32-a07c9026486043359b84a16576cccc635075c300.tar.bz2
busybox-w32-a07c9026486043359b84a16576cccc635075c300.zip
Make it compile with uClibc
-rw-r--r--getty.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/getty.c b/getty.c
index a5a0dc717..c6d0eb710 100644
--- a/getty.c
+++ b/getty.c
@@ -517,11 +517,13 @@ void update_utmp(line)
517char *line; 517char *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