coreaudio: fix possible freeze after pause, seek, unpause
[vlc.git] / contrib / src / dav1d / 0001-meson-favor-_aligned_malloc-over-posix_memalign.patch
blob29bbf23cb5cb3a81f964e6f826f12124a50ca80c
1 From ed39e8fb63bcdb837e3f131140d2d73d02095ca1 Mon Sep 17 00:00:00 2001
2 From: Steve Lhomme <robux4@videolan.org>
3 Date: Thu, 28 May 2020 10:55:24 +0200
4 Subject: [PATCH] meson: favor _aligned_malloc over posix_memalign
6 posix_memalign is defined as a built-in in gcc in msys2 but it's not available
7 when linking with the Universal C Runtime. _aligned_malloc is available in the
8 UCRT.
10 That should only affect builds targeting Windows since _aligned_malloc is a MS
11 thing.
12 ---
13 meson.build | 6 +++---
14 1 file changed, 3 insertions(+), 3 deletions(-)
16 diff --git a/meson.build b/meson.build
17 index 65bea09..25f037f 100644
18 --- a/meson.build
19 +++ b/meson.build
20 @@ -196,10 +196,10 @@ else
21 getopt_dependency = []
22 endif
24 -if cc.has_function('posix_memalign', prefix : '#include <stdlib.h>', args : test_args)
25 - cdata.set('HAVE_POSIX_MEMALIGN', 1)
26 -elif cc.has_function('_aligned_malloc', prefix : '#include <malloc.h>', args : test_args)
27 +if cc.has_function('_aligned_malloc', prefix : '#include <malloc.h>', args : test_args)
28 cdata.set('HAVE_ALIGNED_MALLOC', 1)
29 +elif cc.has_function('posix_memalign', prefix : '#include <stdlib.h>', args : test_args)
30 + cdata.set('HAVE_POSIX_MEMALIGN', 1)
31 elif cc.has_function('memalign', prefix : '#include <malloc.h>', args : test_args)
32 cdata.set('HAVE_MEMALIGN', 1)
33 endif
34 --
35 2.26.0.windows.1