]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libiberty/getruntime.c
Fred Fish <fnf@be.com>
[thirdparty/gcc.git] / libiberty / getruntime.c
index 74f4dd5b30757795a011c0fc5ffae9b7c1f70540..c7a33d78d7cef7f49a3aeab74964789dbcd55e3c 100644 (file)
@@ -28,7 +28,7 @@ Boston, MA 02111-1307, USA.  */
 
 #include <time.h>
 
-#ifdef HAVE_GETRUSAGE
+#if defined (HAVE_GETRUSAGE) && defined (HAVE_SYS_RESOURCE_H)
 #include <sys/time.h>
 #include <sys/resource.h>
 #endif
@@ -54,7 +54,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);