]> granicus.if.org Git - sudo/commitdiff
Include utmp.h / utmpx.h before missing.h as apparently including it
authorTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 9 Feb 2011 20:09:03 +0000 (15:09 -0500)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 9 Feb 2011 20:09:03 +0000 (15:09 -0500)
afterwards causes a compilation problem on GNU Hurd.

--HG--
branch : 1.7

boottime.c

index 607cf74a79baa621345807d7ad1688825c4823e9..bdcd1f2d26a2ee3081efd4df83573456599d671b 100644 (file)
 #if TIME_WITH_SYS_TIME
 # include <time.h>
 #endif
-
+#ifdef HAVE_GETUTXID
+# include <utmpx.h>
+#endif
+#ifdef HAVE_GETUTID
+# include <utmp.h>
+#endif
 #ifdef HAVE_SYSCTL
 # include <sys/sysctl.h>
 #endif
@@ -101,7 +106,6 @@ get_boottime(tv)
 
 #elif defined(HAVE_GETUTXID)
 
-#include <utmpx.h>
 int
 get_boottime(tv)
     struct timeval *tv;
@@ -120,7 +124,6 @@ get_boottime(tv)
 
 #elif defined(HAVE_GETUTID)
 
-#include <utmp.h>
 int
 get_boottime(tv)
     struct timeval *tv;