summaryrefslogtreecommitdiff
path: root/data/openssh/utmp.diff
blob: fcba24b7da1f6d084703f84b50699d79eff42a76 (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
39
40
diff -ru openssh-5.2p1/includes.h openssh-5.2p1+iPhone/includes.h
--- openssh-5.2p1/includes.h	2008-07-04 13:10:49.000000000 +0000
+++ openssh-5.2p1+iPhone/includes.h	2009-04-06 09:36:35.000000000 +0000
@@ -18,6 +18,7 @@
 
 #include "config.h"
 
+#define _UTMPX_COMPAT
 #define _GNU_SOURCE /* activate extra prototypes for glibc */
 
 #include <sys/types.h>
@@ -63,6 +64,10 @@
 # include <login.h>
 #endif
 
+#ifdef HAVE_UTIL_H
+# include <util.h>
+#endif
+
 #ifdef HAVE_UTMP_H
 #  include <utmp.h>
 #endif
diff -ru openssh-5.2p1/loginrec.c openssh-5.2p1+iPhone/loginrec.c
--- openssh-5.2p1/loginrec.c	2009-02-12 02:12:22.000000000 +0000
+++ openssh-5.2p1+iPhone/loginrec.c	2009-04-06 09:30:45.000000000 +0000
@@ -188,12 +188,12 @@
  ** prototypes for helper functions in this file
  **/
 
-#if HAVE_UTMP_H
+#if defined(USE_UTMP) || defined (USE_WTMP) || defined (USE_LOGIN)
 void set_utmp_time(struct logininfo *li, struct utmp *ut);
 void construct_utmp(struct logininfo *li, struct utmp *ut);
 #endif
 
-#ifdef HAVE_UTMPX_H
+#if defined(USE_UTMPX) || defined (USE_WTMPX)
 void set_utmpx_time(struct logininfo *li, struct utmpx *ut);
 void construct_utmpx(struct logininfo *li, struct utmpx *ut);
 #endif