threads: always include necessary headers for number of CPUs detection
authorJanne Grunau <janne-libav@jannau.net>
Fri, 23 Dec 2011 23:04:16 +0000 (00:04 +0100)
committerJanne Grunau <janne-libav@jannau.net>
Sat, 31 Dec 2011 16:40:12 +0000 (17:40 +0100)
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.

libavcodec/pthread.c

index 4356b32..73d96fc 100644 (file)
 #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