From 9086ccafbec2c694abcf7c56814df61b05924103 Mon Sep 17 00:00:00 2001
From: Mathias Gumz <akira at fluxbox dot org>
Date: Wed, 23 Mar 2011 12:03:08 +0100
Subject: compile fix: sunCC again, wants a compile time constant for arrays

---
 src/FbTk/ImageControl.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/FbTk/ImageControl.cc b/src/FbTk/ImageControl.cc
index 00f566d..a5e5cd1 100644
--- a/src/FbTk/ImageControl.cc
+++ b/src/FbTk/ImageControl.cc
@@ -111,14 +111,14 @@ void allocateUnallocatedColors(std::vector<XColor> colors, Display* dpy, Colorma
     // 'icolors' will hold the first 'nr_icolors' colors of the
     // given (indexed) colormap.
     const size_t nr_icolors = std::min(256, 1 << screen_depth);
-    XColor icolors[nr_icolors];
+    std::vector<XColor> icolors(nr_icolors);
 
     // give each icolor an index
     for (i = 0; i < nr_icolors; i++)
         icolors[i].pixel = i;
 
     // query the colors of the colormap and store them into 'icolors'
-    XQueryColors(dpy, cmap, icolors, nr_icolors);
+    XQueryColors(dpy, cmap, &icolors[0], nr_icolors);
 
     // try to find a close color for all not allocated colors
     for (i = 0; i < colors.size(); i++) {
-- 
cgit v0.11.2