aboutsummaryrefslogtreecommitdiff
path: root/getty.c
diff options
context:
space:
mode:
authorandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-08-22 00:10:00 +0000
committerandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-08-22 00:10:00 +0000
commit18c16aba4c39c891326f22258f4d06d7538e39d9 (patch)
tree457698d5de2c9f4ea02e5ba5788fe9a48517b1a5 /getty.c
parent873ec1d4e4d54ab22b2c18765154097a922daf2f (diff)
downloadbusybox-w32-18c16aba4c39c891326f22258f4d06d7538e39d9.tar.gz
busybox-w32-18c16aba4c39c891326f22258f4d06d7538e39d9.tar.bz2
busybox-w32-18c16aba4c39c891326f22258f4d06d7538e39d9.zip
Make it compile with uClibc
git-svn-id: svn://busybox.net/trunk/busybox@3324 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to '')
-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