Expand the gdbarch per-architecture data vector as needed, rather
[deliverable/binutils-gdb.git] / libiberty / getruntime.c
index 6e70773bd94bae14cc931c9f223f9a88046ae151..4abfa83bf337b702d1d37397f0e6262e836c1634 100644 (file)
@@ -26,10 +26,20 @@ Boston, MA 02111-1307, USA.  */
    single way is available for all host systems, nor are there reliable
    ways to find out which way is correct for a given host. */
 
-#include <time.h>
+#ifdef TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# if HAVE_SYS_TIME_H
+#  include <sys/time.h>
+# else
+#  ifdef HAVE_TIME_H
+#   include <time.h>
+#  endif
+# endif
+#endif
 
-#ifdef HAVE_GETRUSAGE
-#include <sys/time.h>
+#if defined (HAVE_GETRUSAGE) && defined (HAVE_SYS_RESOURCE_H)
 #include <sys/resource.h>
 #endif
 
@@ -66,7 +76,7 @@ Boston, MA 02111-1307, USA.  */
 long
 get_run_time ()
 {
-#ifdef HAVE_GETRUSAGE
+#if defined (HAVE_GETRUSAGE) && defined (HAVE_SYS_RESOURCE_H)
   struct rusage rusage;
 
   getrusage (0, &rusage);
This page took 0.023285 seconds and 4 git commands to generate.