diff Plugins/Input/wma/libffwma/mem.c @ 1540:237bb7c97759 trunk

[svn] - use posix_memalign() instead of memalign().
author nenolod
date Wed, 09 Aug 2006 02:11:01 -0700
parents 57de7a460283
children 9937a2512823
line wrap: on
line diff
--- a/Plugins/Input/wma/libffwma/mem.c	Wed Aug 09 02:04:02 2006 -0700
+++ b/Plugins/Input/wma/libffwma/mem.c	Wed Aug 09 02:11:01 2006 -0700
@@ -29,9 +29,8 @@
 #undef free
 #undef realloc
 
-#ifdef HAVE_MALLOC_H
-#include <malloc.h>
-#endif
+#define _XOPEN_SOURCE 600
+#include <stdlib.h>
 
 /* you can redefine av_malloc and av_free in your project to use your
    memory allocator. You do not need to suppress this file because the
@@ -44,7 +43,11 @@
  */
 void *av_malloc(unsigned int size)
 {
-    return memalign(16,size);
+    void *ptr;
+
+    posix_memalign(&ptr, 16, size);
+
+    return ptr;
 }
 
 /**