[FFmpeg-devel] No thread library dependencies when threading support is disabled.

Submitted by Gregory J. Wolfe on Nov. 28, 2016, 7:41 p.m.

Details

Message ID 1480362109-29672-1-git-send-email-gregory.wolfe@kodakalaris.com
State New
Headers show

Commit Message

Gregory J. Wolfe Nov. 28, 2016, 7:41 p.m.
When ALL threading support is disabled, the build should not create
a dependency on ANY thread library.

Signed-off-by: Gregory J. Wolfe <gregory.wolfe@kodakalaris.com>
---
 libavutil/cpu.c | 2 ++
 1 file changed, 2 insertions(+)

Patch hide | download patch | download mbox

diff --git a/libavutil/cpu.c b/libavutil/cpu.c
index 73317c4..1803f6f 100644
--- a/libavutil/cpu.c
+++ b/libavutil/cpu.c
@@ -260,6 +260,7 @@  int av_cpu_count(void)
     static volatile int printed;
 
     int nb_cpus = 1;
+#if HAVE_THREADS
 #if HAVE_WINRT
     SYSTEM_INFO sysinfo;
 #endif
@@ -288,6 +289,7 @@  int av_cpu_count(void)
     GetNativeSystemInfo(&sysinfo);
     nb_cpus = sysinfo.dwNumberOfProcessors;
 #endif
+#endif
 
     if (!printed) {
         av_log(NULL, AV_LOG_DEBUG, "detected %d logical cores\n", nb_cpus);