modified utmp to look for HAVE_UTMPX_H, instead of keying
authoraland <aland>
Tue, 7 Mar 2000 16:16:58 +0000 (16:16 +0000)
committeraland <aland>
Tue, 7 Mar 2000 16:16:58 +0000 (16:16 +0000)
off of __svr4__.  This allows allows Solaris SunProC compiles to work.

Patch by Alex Kiernan <alexk@demon.net>

src/include/sysutmp.h
src/main/radwho.c
src/modules/rlm_unix/rlm_unix.c

index 236b5ad..32a1615 100644 (file)
@@ -7,10 +7,10 @@
 #ifndef SYSUTMP_H_INCLUDED
 #define SYSUTMP_H_INCLUDED
 
-#ifdef HAVE_UTMP_H
+#if defined(HAVE_UTMP_H) || defined(HAVE_UTMPX_H)
 
 /* UTMP stuff. Uses utmpx on svr4 */
-#ifdef __svr4__
+#ifdef HAVE_UTMPX_H
 #  include <utmpx.h>
 #  include <sys/fcntl.h>
 #  define utmp utmpx
index ce3b761..76c86cf 100644 (file)
@@ -486,7 +486,7 @@ int main(int argc, char **argv)
                                        fullname(ut.ut_name),
                                        "shell",
                                        ttyshort(ut.ut_line),
-#ifdef __svr4__
+#ifdef HAVE_UTMPX_H
                                        dotime(ut.ut_xtime),
 #else
                                        dotime(ut.ut_time),
@@ -498,7 +498,7 @@ int main(int argc, char **argv)
                                        ut.ut_name,
                                        ttyshort(ut.ut_line),
                                        "shell",
-#ifdef __svr4__
+#ifdef HAVE_UTMPX_H
                                        dotime(ut.ut_xtime),
 #else
                                        dotime(ut.ut_time),
index a0d1df1..38c6c31 100644 (file)
@@ -439,7 +439,7 @@ static int unix_accounting(REQUEST *request)
                strncpy(ut.ut_host, buf, UT_HOSTSIZE);
        }
 #endif
-#ifdef __svr4__
+#ifdef HAVE_UTMPX_H
        ut.ut_xtime = t- delay;
 #else
        ut.ut_time = t - delay;