Fixed compilation with index symbol
authorLionel Landwerlin <llandwerlin@gmail.com>
Thu, 24 May 2012 09:13:44 +0000 (10:13 +0100)
committerLionel Landwerlin <llandwerlin@gmail.com>
Fri, 25 May 2012 09:34:59 +0000 (10:34 +0100)
Apparently some versions of gcc or combination of options (or maybe
with the android NDK) lead to compilation failure :

atkutil.c:74: error: 'index' redeclared as different kind of symbol

This fixes the problem by renaming the variable.

atk/atkutil.c

index bd1b252..9a06723 100755 (executable)
@@ -71,7 +71,7 @@ static gboolean init_done = FALSE;
  * Array of FocusTracker structs
  */
 static GArray *trackers = NULL;
-static guint  index = 0;
+static guint  global_index = 0;
 
 typedef struct _FocusTracker FocusTracker;
 
@@ -124,10 +124,10 @@ atk_add_focus_tracker (AtkEventListener   focus_tracker)
   {
     FocusTracker item;
 
-    item.index = ++index;
+    item.index = ++global_index;
     item.func = focus_tracker;
     trackers = g_array_append_val (trackers, item);
-    return index;
+    return global_index;
   }
   else
   {