summaryrefslogtreecommitdiff
path: root/libc/misc/utmp/wtent.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/misc/utmp/wtent.c')
-rw-r--r--libc/misc/utmp/wtent.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/libc/misc/utmp/wtent.c b/libc/misc/utmp/wtent.c
index c97f89cff..97254262f 100644
--- a/libc/misc/utmp/wtent.c
+++ b/libc/misc/utmp/wtent.c
@@ -11,6 +11,9 @@
#include <time.h>
#include <unistd.h>
#include <utmp.h>
+#ifdef __UCLIBC_HAS_UTMPX__
+# include <utmpx.h>
+#endif
#include <fcntl.h>
#include <sys/file.h>
#include <not-cancel.h>
@@ -33,7 +36,7 @@ void logwtmp (const char *line, const char *name, const char *host)
}
#endif
-void updwtmp(const char *wtmp_file, const struct utmp *lutmp)
+static void __updwtmp(const char *wtmp_file, const struct utmp *lutmp)
{
int fd;
@@ -46,4 +49,11 @@ void updwtmp(const char *wtmp_file, const struct utmp *lutmp)
}
}
}
-libc_hidden_def(updwtmp)
+strong_alias(__updwtmp,updwtmp)
+
+#ifdef __UCLIBC_HAS_UTMPX__
+void updwtmpx (const char *wtmpx_file, const struct utmpx *utmpx)
+{
+ __updwtmp (wtmpx_file, (const struct utmp *) utmpx);
+}
+#endif