diff options
author | Wan-Teh Chang <wtc-at-google.com@ffmpeg.org> | 2016-12-06 22:00:02 +0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2016-12-11 00:47:10 +0300 |
commit | 3703f13333e24540a5ef132e7b2a9c0ded7e4531 (patch) | |
tree | 159b74d368620f1f8713ed66cec03dd78ecfdbdf /libavutil | |
parent | 8986885801fbd6e7d5440c8e5cb03d5d2745298c (diff) |
avutil/tests: run the cpu_init.c test conditionally on HAVE_THREADS
Suggested by Diego Biurrun and James Almer.
Signed-off-by: Wan-Teh Chang <wtc@google.com>
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/Makefile | 2 | ||||
-rw-r--r-- | libavutil/tests/cpu_init.c | 7 |
2 files changed, 1 insertions, 8 deletions
diff --git a/libavutil/Makefile b/libavutil/Makefile index a8c0882929..98416457bb 100644 --- a/libavutil/Makefile +++ b/libavutil/Makefile @@ -190,7 +190,6 @@ TESTPROGS = adler32 \ camellia \ color_utils \ cpu \ - cpu_init \ crc \ des \ dict \ @@ -226,6 +225,7 @@ TESTPROGS = adler32 \ tea \ TESTPROGS-$(HAVE_LZO1X_999_COMPRESS) += lzo +TESTPROGS-$(HAVE_THREADS) += cpu_init TOOLS = crypto_bench ffhash ffeval ffescape diff --git a/libavutil/tests/cpu_init.c b/libavutil/tests/cpu_init.c index 87c6002afd..a379e47b13 100644 --- a/libavutil/tests/cpu_init.c +++ b/libavutil/tests/cpu_init.c @@ -24,12 +24,9 @@ #include <stdio.h> #include <string.h> -#include "config.h" - #include "libavutil/cpu.h" #include "libavutil/thread.h" -#if HAVE_PTHREADS static void *thread_main(void *arg) { int *flags = arg; @@ -37,12 +34,9 @@ static void *thread_main(void *arg) *flags = av_get_cpu_flags(); return NULL; } -#endif - int main(void) { -#if HAVE_PTHREADS int cpu_flags1; int cpu_flags2; int ret; @@ -66,7 +60,6 @@ int main(void) return 2; if (cpu_flags1 != cpu_flags2) return 3; -#endif return 0; } |