--- src/ui/play.c--	Fri Jul  3 15:42:09 1998
+++ src/ui/play.c	Fri Jul  3 15:41:43 1998
@@ -1,6 +1,13 @@
+#if defined(HAVE_SYS_PARAM_H)
+#include <sys/param.h>
+#endif
 #ifndef _plan9_
 #include <limits.h>
+#if (!defined(BSD) || (BSD < 199506))
 #include <malloc.h>
+#else
+#include <stdlib.h>
+#endif
 #include <string.h>
 #else
 #include <u.h>
--- src/ui/save.c--	Thu Mar  5 03:19:12 1998
+++ src/ui/save.c	Fri Jul  3 15:43:21 1998
@@ -1,8 +1,15 @@
+#if defined(HAVE_SYS_PARAM_H)
+#include <sys/param.h>
+#endif
 #ifndef _plan9_
 #include <limits.h>
 #include <string.h>
 #include <errno.h>
+#if (!defined(BSD) || (BSD < 199506))
 #include <malloc.h>
+#else
+#include <stdlib.h>
+#endif
 #else
 #include <u.h>
 #include <libc.h>
--- src/ui/ui_helper.c--	Thu Mar  5 03:19:12 1998
+++ src/ui/ui_helper.c	Fri Jul  3 15:40:43 1998
@@ -1,5 +1,10 @@
+#if defined(HAVE_SYS_PARAM_H)
+#include <sys/param.h>
+#endif
 #ifndef _plan9_
+#if (!defined(BSD) || (BSD < 199506))
 #include <malloc.h>
+#endif
 #include <ctype.h>
 #include <stdlib.h>
 #include <limits.h>
