blob: 924cbe531b6c0068598180e0afa1ab29547cfaeb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
Description: Turn glx_ansic.h into a no-op include. (by using memset, malloc, free directly)
Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
--- a/src/mesa/drivers/dri/common/glcontextmodes.c
+++ b/src/mesa/drivers/dri/common/glcontextmodes.c
@@ -44,16 +44,17 @@
# include "GL/glxint.h"
# ifdef XFree86Server
+# include <stdlib.h>
+# include <string.h>
# include "GL/glx_ansic.h"
-extern void * __glXMalloc( size_t size );
-extern void __glXFree( void * ptr );
-# define _mesa_malloc(b) __glXMalloc(b)
-# define _mesa_free(m) __glXFree(m)
+# define __glXMemset memset
+# define _mesa_malloc(b) malloc(b)
+# define _mesa_free(m) free(m)
# else
# include <X11/Xlibint.h>
# define __glXMemset memset
-# define _mesa_malloc(b) Xmalloc(b)
-# define _mesa_free(m) Xfree(m)
+# define _mesa_malloc(b) malloc(b)
+# define _mesa_free(m) free(m)
# endif /* XFree86Server */
#endif /* !defined(IN_MINI_GLX) */
|