Blame SOURCES/jdk8197546-pr3542-rh1402819-fix_for_8171000_breaks_solaris_linux_builds.patch

43ae3d
# HG changeset patch
43ae3d
# User prr
43ae3d
# Date 1518454604 28800
43ae3d
#      Mon Feb 12 08:56:44 2018 -0800
43ae3d
# Node ID 556adf3a76aa81bf3918d7d46554dae7cc1d5c5c
43ae3d
# Parent  b77308735540644d4710244e3c88865067f2905a
43ae3d
8197546: Fix for 8171000 breaks Solaris + Linux builds
43ae3d
Reviewed-by: serb, jdv
43ae3d
43ae3d
diff --git openjdk.orig/jdk/src/solaris/native/sun/awt/multiVis.c openjdk/jdk/src/solaris/native/sun/awt/multiVis.c
43ae3d
--- openjdk.orig/jdk/src/solaris/native/sun/awt/multiVis.c
43ae3d
+++ openjdk/jdk/src/solaris/native/sun/awt/multiVis.c
43ae3d
@@ -395,6 +395,8 @@
43ae3d
 list_ptr regions;/* list of regions to read from */
43ae3d
 {
43ae3d
     XImage              *ximage ;
43ae3d
+    image_region_type* reg;
43ae3d
+    int32_t rect;
43ae3d
 
43ae3d
     ximage = XCreateImage(disp,fakeVis,(uint32_t) depth,format,0,NULL,
43ae3d
                           (uint32_t)width,(uint32_t)height,8,0);
43ae3d
@@ -402,11 +404,11 @@
43ae3d
     ximage->data = calloc(ximage->bytes_per_line*height*((format==ZPixmap)? 1 : depth), sizeof(char));
43ae3d
     ximage->bits_per_pixel = depth; /** Valid only if format is ZPixmap ***/
43ae3d
 
43ae3d
-    for (image_region_type* reg = (image_region_type *) first_in_list( regions); reg;
43ae3d
+    for (reg = (image_region_type *) first_in_list( regions); reg;
43ae3d
          reg = (image_region_type *) next_in_list( regions))
43ae3d
     {
43ae3d
                 struct my_XRegion *vis_reg = (struct my_XRegion *)(reg->visible_region);
43ae3d
-                for (int32_t rect = 0; rect < vis_reg->numRects; rect++)
43ae3d
+                for (rect = 0; rect < vis_reg->numRects; rect++)
43ae3d
                 {
43ae3d
                     /** ------------------------------------------------------------------------
43ae3d
                             Intersect bbox with visible part of region giving src rect & output