mem: Fix usage of memalign() on DJGPP. n1.2
authorFabrizio Gennari <fabrizio.ge@tiscali.it>
Sun, 10 Mar 2013 09:22:45 +0000 (10:22 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 14 Mar 2013 22:30:35 +0000 (23:30 +0100)
Credits to Khusraw of bttr-software.de forum.
Signed-off-by: Carl Eugen Hoyos <cehoyos@ag.or.at>
(cherry picked from commit 91b747ac78218805a79435f50587f87167569dad)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavutil/mem.c

index a7fe608..860c011 100644 (file)
@@ -95,7 +95,11 @@ void *av_malloc(size_t size)
 #elif HAVE_ALIGNED_MALLOC
     ptr = _aligned_malloc(size, ALIGN);
 #elif HAVE_MEMALIGN
+#ifndef __DJGPP__
     ptr = memalign(ALIGN, size);
+#else
+    ptr = memalign(size, ALIGN);
+#endif
     /* Why 64?
      * Indeed, we should align it:
      *   on  4 for 386