Check for sys/resource.h and include it conditionally.
[ffmpeg.git] / ffmpeg.c
index 733ff0d7822bb9ca32c95c9fccd34a6480a78f5f..874418bad6fc40512dbdfc045a833b8f179e51b3 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -36,7 +36,9 @@
 #include "avstring.h"
 #include "os_support.h"
 
-#if !defined(HAVE_GETRUSAGE) && defined(HAVE_GETPROCESSTIMES)
+#ifdef HAVE_SYS_RESOURCE_H
+#include <sys/resource.h>
+#elif defined(HAVE_GETPROCESSTIMES)
 #include <windows.h>
 #endif
 
@@ -46,7 +48,6 @@
 #include <sys/ioctl.h>
 #include <sys/time.h>
 #include <termios.h>
-#include <sys/resource.h>
 #elif defined(HAVE_CONIO_H)
 #include <conio.h>
 #endif