mem: Fix usage of memalign() on DJGPP.
Credits to Khusraw of bttr-software.de forum.
Signed-off-by: Carl Eugen Hoyos <cehoyos@ag.or.at>
(cherry picked from commit 91b747ac78
)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
committed by
Michael Niedermayer
parent
17911d0a96
commit
e820e3a259
@@ -95,7 +95,11 @@ void *av_malloc(size_t size)
|
|||||||
#elif HAVE_ALIGNED_MALLOC
|
#elif HAVE_ALIGNED_MALLOC
|
||||||
ptr = _aligned_malloc(size, ALIGN);
|
ptr = _aligned_malloc(size, ALIGN);
|
||||||
#elif HAVE_MEMALIGN
|
#elif HAVE_MEMALIGN
|
||||||
|
#ifndef __DJGPP__
|
||||||
ptr = memalign(ALIGN, size);
|
ptr = memalign(ALIGN, size);
|
||||||
|
#else
|
||||||
|
ptr = memalign(size, ALIGN);
|
||||||
|
#endif
|
||||||
/* Why 64?
|
/* Why 64?
|
||||||
* Indeed, we should align it:
|
* Indeed, we should align it:
|
||||||
* on 4 for 386
|
* on 4 for 386
|
||||||
|
Reference in New Issue
Block a user