this should fix a build error on OS X
AC_HEADER_SYS_WAIT
AC_HEADER_DIRENT
AC_TYPE_SIGNAL
-AC_CHECK_HEADERS(stropts.h sys/time.h string.h unistd.h sys/systeminfo.h)
+AC_CHECK_HEADERS(stropts.h sys/time.h string.h unistd.h sys/systeminfo.h malloc.h)
AC_CHECK_HEADERS(fcntl.h sys/fcntl.h, break)
AC_CHECK_HEADERS(sys/socket.h lan/socket.h, break)
AC_CHECK_HEADER(stddef.h, [], AC_DEFINE(X_WCHAR, 1))
*/
#include <stdio.h>
#include <stdlib.h>
-#include <malloc.h>
+
+#if HAVE_MALLOC_H
+ #include <malloc.h>
+#endif
#ifdef WIN32
// [HGM] this was probably a Windows-specific constant. Needs to be defined here now I