--- pgdispd/proccom.c.orig	1994-08-22 16:33:35.000000000 -0400
+++ pgdispd/proccom.c	2009-02-28 13:37:38.000000000 -0500
@@ -93,10 +93,12 @@
 #include <sys/types.h>
 #include <netinet/in.h>
 
-#ifndef VMS
+#if !defined(VMS) && !defined(__APPLE__)
 #include <values.h>
 #endif
 
+#include <stdlib.h>
+
 #ifdef sun
 #include <memory.h>
 #endif
@@ -163,8 +165,6 @@
 	void drawline();	/* draw a line in the bitmap window */
 	Pixmap XCreatePixmap();
 
-	char *malloc();
-
 	if (!len & savedshorts)
 	{ /* an incomplete command was sent! */
 		savedshorts=0;