Browse code

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>

Fabrizio Gennari authored on 2013/03/10 18:22:45
Showing 1 changed files
... ...
@@ -95,7 +95,11 @@ void *av_malloc(size_t size)
95 95
 #elif HAVE_ALIGNED_MALLOC
96 96
     ptr = _aligned_malloc(size, ALIGN);
97 97
 #elif HAVE_MEMALIGN
98
+#ifndef __DJGPP__
98 99
     ptr = memalign(ALIGN, size);
100
+#else
101
+    ptr = memalign(size, ALIGN);
102
+#endif
99 103
     /* Why 64?
100 104
      * Indeed, we should align it:
101 105
      *   on  4 for 386