aboutsummaryrefslogtreecommitdiff
path: root/gdb/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/utils.c')
-rw-r--r--gdb/utils.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gdb/utils.c b/gdb/utils.c
index b81e3fd..3aac2db 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -56,6 +56,12 @@
#include <readline/readline.h>
+#ifndef MALLOC_INCOMPATIBLE
+#ifdef NEED_DECLARATION_FREE
+extern void free ();
+#endif
+#endif
+
#undef XMALLOC
#define XMALLOC(TYPE) ((TYPE*) xmalloc (sizeof (TYPE)))
@@ -1110,7 +1116,7 @@ void
xfree (void *ptr)
{
if (ptr != NULL)
- free (ptr);
+ free (ptr); /* NOTE: GDB's only call to free() */
}