summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen2001-08-22 00:10:00 +0000
committerEric Andersen2001-08-22 00:10:00 +0000
commita07c9026486043359b84a16576cccc635075c300 (patch)
tree457698d5de2c9f4ea02e5ba5788fe9a48517b1a5
parent75220b55ffabfc93512a380d3a90fe21333a6ff9 (diff)
downloadbusybox-a07c9026486043359b84a16576cccc635075c300.zip
busybox-a07c9026486043359b84a16576cccc635075c300.tar.gz
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 a5a0dc7..c6d0eb7 100644
--- a/getty.c
+++ b/getty.c
@@ -517,11 +517,13 @@ void update_utmp(line)
char *line;
{
struct utmp ut;
- time_t t;
int mypid = getpid();
long time();
long lseek();
+#ifndef __UCLIBC__
+ time_t t;
struct utmp *utp;
+#endif
#if ! (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1))
struct flock lock;
@@ -536,7 +538,7 @@ char *line;
* entry in the utmp file.
*/
-#ifdef __linux__
+#ifndef __UCLIBC__
utmpname(_PATH_UTMP);
setutent();
while ((utp = getutent())
@@ -571,8 +573,8 @@ char *line;
{
int ut_fd;
- if ((ut_fd = open(UTMP_FILE, 2)) < 0) {
- error("%s: open for update: %m"), UTMP_FILE;
+ if ((ut_fd = open(_PATH_WTMP, 2)) < 0) {
+ error("%s: open for update: %m"), _PATH_WTMP;
} else {
long ut_size = sizeof(ut); /* avoid nonsense */