[FFmpeg-cvslog] threads: always include necessary headers for number of CPUs detection

Janne Grunau git at videolan.org
Sun Jan 1 02:49:36 CET 2012


ffmpeg | branch: master | Janne Grunau <janne-libav at jannau.net> | Sat Dec 24 00:04:16 2011 +0100| [937ff3a18a637a28e56752b57b6c2f6ed47b04c1] | committer: Janne Grunau

threads: always include necessary headers for number of CPUs detection

Since the conditions for the actual usage are more specific a less
preferred method can be used. This would cause compilation errors
because necessary headers are not included.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=937ff3a18a637a28e56752b57b6c2f6ed47b04c1
---

 libavcodec/pthread.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c
index 4356b32..73d96fc 100644
--- a/libavcodec/pthread.c
+++ b/libavcodec/pthread.c
@@ -34,9 +34,11 @@
 #if HAVE_SCHED_GETAFFINITY
 #define _GNU_SOURCE
 #include <sched.h>
-#elif HAVE_GETSYSTEMINFO
+#endif
+#if HAVE_GETSYSTEMINFO
 #include <windows.h>
-#elif HAVE_SYSCTL
+#endif
+#if HAVE_SYSCTL
 #if HAVE_SYS_PARAM_H
 #include <sys/param.h>
 #endif



More information about the ffmpeg-cvslog mailing list