[vala/0.48] vala: Fix build with valac < 0.44



commit 22f0c9016c60c438273b5097e8d6666dadd994f5
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Wed Mar 3 17:37:04 2021 +0100

    vala: Fix build with valac < 0.44

 vala/valacodecontext.vala | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/vala/valacodecontext.vala b/vala/valacodecontext.vala
index 48f0964c5..051cc2c00 100644
--- a/vala/valacodecontext.vala
+++ b/vala/valacodecontext.vala
@@ -602,7 +602,8 @@ public class Vala.CodeContext {
                if (target_glib == "auto") {
                        var available_glib = pkg_config_modversion ("glib-2.0");
                        if (available_glib != null && available_glib.scanf ("%d.%d", out glib_major, out 
glib_minor) >= 2) {
-                               glib_minor -= ++glib_minor % 2;
+                               glib_minor++;
+                               glib_minor -= glib_minor % 2;
                                set_target_glib_version ("%d.%d".printf (glib_major, glib_minor));
                        } else {
                                Report.warning (null, "Could not determine the version of `glib-2.0', target 
version of glib was not set");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]