$NetBSD: patch-bj,v 1.2 2011/07/03 20:15:59 dholland Exp $

- use modern C
- fix bug masked by casting

--- server/color.c.orig	1998-05-05 15:01:35.000000000 -0400
+++ server/color.c	2008-08-31 01:25:45.000000000 -0400
@@ -31,6 +31,7 @@
 #include <sys/select.h>
 #endif
 #include <stdlib.h>
+#include <string.h>
 #define NEED_REPLIES
 #define NEED_EVENTS
 #include <X11/Xproto.h>
@@ -807,7 +808,7 @@ alloc_cells_reply
          npixels = ((xAllocColorCellsReply *)rp)->nPixels;
          nmasks = ((xAllocColorCellsReply *)rp)->nMasks;
          real_pixels = (pixel_t *)((xAllocColorCellsReply *)rp + 1);
-         maskp = (mask_t *)(real_pixels[npixels]);
+         maskp = (mask_t *)&(real_pixels[npixels]);
          real_mask = 0;
          for (i=0; i<nmasks; i++)
             real_mask |= maskp[i];
