summaryrefslogtreecommitdiff
path: root/libc/misc/utmp/utent.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-09-27 05:24:26 +0000
committerEric Andersen <andersen@codepoet.org>2001-09-27 05:24:26 +0000
commit2512c847453c24b928c34beed88902fbb6877b7a (patch)
tree3d327c54c00684b85c435cffa29c5050888c0a69 /libc/misc/utmp/utent.c
parente83a36ce9f97ac0f59117b3a62fd2dd8461b1fd5 (diff)
Update to accomodate the header file changes
Diffstat (limited to 'libc/misc/utmp/utent.c')
-rw-r--r--libc/misc/utmp/utent.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/libc/misc/utmp/utent.c b/libc/misc/utmp/utent.c
index f9d098fb3..220bd6db6 100644
--- a/libc/misc/utmp/utent.c
+++ b/libc/misc/utmp/utent.c
@@ -7,6 +7,7 @@
have to call endutent() to close the file even if you've not called
setutent -- getutid and family use the same file descriptor. */
+#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <paths.h>
@@ -53,7 +54,7 @@ struct utmp *getutent(void)
return __getutent(ut_fd);
}
-struct utmp *getutid(struct utmp *utmp_entry)
+struct utmp *getutid (const struct utmp *utmp_entry)
{
struct utmp *utmp;
@@ -78,7 +79,7 @@ struct utmp *getutid(struct utmp *utmp_entry)
return NULL;
}
-struct utmp *getutline(struct utmp *utmp_entry)
+struct utmp *getutline(const struct utmp *utmp_entry)
{
struct utmp *utmp;
@@ -102,7 +103,7 @@ struct utmp *getutline(struct utmp *utmp_entry)
return NULL;
}
-struct utmp *pututline(struct utmp *utmp_entry)
+struct utmp *pututline (const struct utmp *utmp_entry)
{
struct utmp *ut;
@@ -122,14 +123,15 @@ struct utmp *pututline(struct utmp *utmp_entry)
return NULL;
}
- return utmp_entry;
+ return (struct utmp *)utmp_entry;
}
-void utmpname(const char *new_ut_name)
+int utmpname (const char *new_ut_name)
{
if (new_ut_name != NULL)
ut_name = new_ut_name;
if (ut_fd != -1)
close(ut_fd);
+ return 0;
}