aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-10-26 19:29:12 -0700
committerElliott Hughes <enh@google.com>2015-10-26 19:29:12 -0700
commit9216a64c90ae30da109850526cdeaca26f38da14 (patch)
tree132ba401999a6fccfc63b88358ef0d031e34ee09
parenta2cf3783d4e9a4008ed468ef3204593f8f549934 (diff)
downloadbionic-9216a64c90ae30da109850526cdeaca26f38da14.tar.gz
Fix <utmp.h> declarations.
If we're going to keep this useless header -- and I think it's too late to remove it -- it may as well be correct. Bug: http://b/17700469 Change-Id: Ifec4f8f1a984483d7fa7d81d47786f75b70ff4ba
-rw-r--r--libc/include/utmp.h5
-rw-r--r--tests/utmp_test.cpp6
2 files changed, 9 insertions, 2 deletions
diff --git a/libc/include/utmp.h b/libc/include/utmp.h
index 7eeea41e2..c6f22a550 100644
--- a/libc/include/utmp.h
+++ b/libc/include/utmp.h
@@ -97,8 +97,9 @@ struct utmp
__BEGIN_DECLS
int utmpname(const char*);
-void setutent();
-struct utmp* getutent();
+void setutent(void);
+struct utmp* getutent(void);
+void endutent(void);
int login_tty(int);
diff --git a/tests/utmp_test.cpp b/tests/utmp_test.cpp
index b61110d68..0fa55c74b 100644
--- a/tests/utmp_test.cpp
+++ b/tests/utmp_test.cpp
@@ -23,3 +23,9 @@ TEST(utmp, login_tty) {
// This test just checks that we're exporting the symbol independently.
ASSERT_EQ(-1, login_tty(-1));
}
+
+TEST(utmp, setutent_getutent_endutent) {
+ setutent();
+ getutent();
+ endutent();
+}