[gdbserver] Move malloc.h include to server.h.
[binutils-gdb.git] / gdb / gdbserver / server.h
index 286c80a52b9637b63c807469ff96b783187bb953..d5f32e8cd07b69715d3ab7a3b8332153258d1568 100644 (file)
 #ifdef HAVE_ALLOCA_H
 #include <alloca.h>
 #endif
+/* On some systems such as MinGW, alloca is declared in malloc.h
+   (there is no alloca.h).  */
+#if HAVE_MALLOC_H
+#include <malloc.h>
+#endif
 
 #if !HAVE_DECL_STRERROR
 #ifndef strerror