changeset 1540:237bb7c97759 trunk

[svn] - use posix_memalign() instead of memalign().
author nenolod
date Wed, 09 Aug 2006 02:11:01 -0700
parents 850f1eba9cbd
children 06329cbf186a
files ChangeLog Plugins/Input/wma/libffwma/mem.c
diffstat 2 files changed, 17 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Aug 09 02:04:02 2006 -0700
+++ b/ChangeLog	Wed Aug 09 02:11:01 2006 -0700
@@ -1,3 +1,13 @@
+2006-08-09 09:04:02 +0000  William Pitcock <nenolod@nenolod.net>
+  revision [1992]
+  - switch to stdlib/unistd.h for malloc (all C89/C99 systems have these). fixes bug #539.
+  
+
+  Changes:        Modified:
+  +2 -1           trunk/Plugins/Input/wma/libffwma/uri.c  
+  +1 -1           trunk/Plugins/Input/wma/wma.c  
+
+
 2006-08-09 06:43:33 +0000  William Pitcock <nenolod@nenolod.net>
   revision [1990]
   - fix geometry hinting so that it is ICCCM compliant. patch by whereami.
--- 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;
 }
 
 /**