Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/videolan/dav1d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Lhomme <robux4@videolan.org>2020-05-28 11:55:24 +0300
committerSteve Lhomme <robux4@videolan.org>2020-05-28 11:55:24 +0300
commited39e8fb63bcdb837e3f131140d2d73d02095ca1 (patch)
tree18afa6cdfaaf249bb30edbb425f7526b427676f3 /meson.build
parent059ad248d6b8b5a6115875acd9631746c8c3dc34 (diff)
meson: favor _aligned_malloc over posix_memalign
posix_memalign is defined as a built-in in gcc in msys2 but it's not available when linking with the Universal C Runtime. _aligned_malloc is available in the UCRT. That should only affect builds targeting Windows since _aligned_malloc is a MS thing.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build6
1 files changed, 3 insertions, 3 deletions
diff --git a/meson.build b/meson.build
index 65bea09..25f037f 100644
--- a/meson.build
+++ b/meson.build
@@ -196,10 +196,10 @@ else
getopt_dependency = []
endif
-if cc.has_function('posix_memalign', prefix : '#include <stdlib.h>', args : test_args)
- cdata.set('HAVE_POSIX_MEMALIGN', 1)
-elif cc.has_function('_aligned_malloc', prefix : '#include <malloc.h>', args : test_args)
+if cc.has_function('_aligned_malloc', prefix : '#include <malloc.h>', args : test_args)
cdata.set('HAVE_ALIGNED_MALLOC', 1)
+elif cc.has_function('posix_memalign', prefix : '#include <stdlib.h>', args : test_args)
+ cdata.set('HAVE_POSIX_MEMALIGN', 1)
elif cc.has_function('memalign', prefix : '#include <malloc.h>', args : test_args)
cdata.set('HAVE_MEMALIGN', 1)
endif