summaryrefslogtreecommitdiff
blob: 8644db837f4a5eef2e7c7e559a669cacc4075598 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
--- utempter-0.5.5/utempter.c.mps	2004-12-11 14:54:06.000000000 +0100
+++ utempter-0.5.5/utempter.c	2004-12-11 14:57:46.000000000 +0100
@@ -11,7 +11,9 @@
 #include <sys/stat.h>
 #include <sys/sysmacros.h>
 #include <utmp.h>
+#ifndef __UCLIBC__
 #include <utmpx.h>
+#endif
 #include <unistd.h>
 
 static void usage(void) {
@@ -82,7 +84,11 @@
 }
 
 int main(int argc, const char ** argv) {
+#ifndef __UCLIBC__
     struct utmpx utx;
+#else
+    struct utmp utx;
+#endif
     int add;
     const char * device, * host;
     struct passwd * pw;
@@ -154,8 +160,13 @@
 
     gettimeofday(&utx.ut_tv, NULL);
 
+#ifndef __UCLIBC__
     pututxline(&utx);
     updwtmpx(_PATH_WTMP, &utx);
+#else
+    pututline(&utx);
+    updwtmp(_PATH_WTMP, &utx);
+#endif
 
     return 0;
 }