From: Michal Krol Date: Sun, 20 Jan 2008 20:33:35 +0000 (+0100) Subject: gallium: Fix build on WinXP. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b8dc2956df0f534924fc45287cccc04499e70959;p=mesa.git gallium: Fix build on WinXP. --- diff --git a/src/mesa/pipe/pipebuffer/pb_buffer_client.c b/src/mesa/pipe/pipebuffer/pb_buffer_client.c index 6bf47453016..477ecfe32cf 100644 --- a/src/mesa/pipe/pipebuffer/pb_buffer_client.c +++ b/src/mesa/pipe/pipebuffer/pb_buffer_client.c @@ -34,6 +34,7 @@ */ +#include "pipe/p_util.h" #include "pb_buffer.h" #include "pipe/p_util.h" @@ -61,7 +62,7 @@ static void pb_user_buffer_destroy(struct pb_buffer *buf) { assert(buf); - free(buf); + FREE(buf); } diff --git a/src/mesa/pipe/pipebuffer/pb_buffer_malloc.c b/src/mesa/pipe/pipebuffer/pb_buffer_malloc.c index e02eb1eebd4..42aae7acfa2 100644 --- a/src/mesa/pipe/pipebuffer/pb_buffer_malloc.c +++ b/src/mesa/pipe/pipebuffer/pb_buffer_malloc.c @@ -62,7 +62,7 @@ static void malloc_buffer_destroy(struct pb_buffer *buf) { free(malloc_buffer(buf)->data); - free(buf); + FREE(buf); } @@ -110,7 +110,7 @@ pb_malloc_buffer_create( unsigned alignment, /* TODO: accept an alignment parameter */ /* TODO: do a single allocation */ - buf = (struct malloc_buffer *)malloc(sizeof(struct malloc_buffer)); + buf = (struct malloc_buffer *)MALLOC(sizeof(struct malloc_buffer)); if(!buf) return NULL; @@ -121,7 +121,7 @@ pb_malloc_buffer_create( unsigned alignment, buf->data = malloc(size); if(!buf->data) { - free(buf); + FREE(buf); return NULL; }