[gnome-builder] build: fix use of reserved word environ



commit 353b8d9e2090e195134a7458e1586751fd7cadd2
Author: Christian Hergert <chergert redhat com>
Date:   Mon May 11 16:08:06 2020 -0700

    build: fix use of reserved word environ
    
    Fixes #1210

 src/plugins/buildui/gbp-buildui-config-view-addin.c | 6 +++---
 src/plugins/podman/gbp-podman-subprocess-launcher.c | 8 ++++----
 2 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/src/plugins/buildui/gbp-buildui-config-view-addin.c 
b/src/plugins/buildui/gbp-buildui-config-view-addin.c
index 6367b675a..dd387a1a6 100644
--- a/src/plugins/buildui/gbp-buildui-config-view-addin.c
+++ b/src/plugins/buildui/gbp-buildui-config-view-addin.c
@@ -392,7 +392,7 @@ gbp_buildui_config_view_addin_load (IdeConfigViewAddin *addin,
   IdeRuntimeManager *runtime_manager;
   g_autoptr(GFile) workdir = NULL;
   IdeBuildSystem *build_system;
-  IdeEnvironment *environ;
+  IdeEnvironment *environ_;
   IdeContext *context;
   GtkWidget *box;
   GtkWidget *entry;
@@ -485,12 +485,12 @@ gbp_buildui_config_view_addin_load (IdeConfigViewAddin *addin,
   dzl_preferences_add_custom (preferences, "general", "toolchain", create_toolchain_box (config, 
toolchain_manager), NULL, 10);
 
   /* Add environment selector */
-  environ = ide_config_get_environment (config);
+  environ_ = ide_config_get_environment (config);
   dzl_preferences_add_custom (preferences, "environ", "build",
                               g_object_new (GTK_TYPE_FRAME,
                                             "visible", TRUE,
                                             "child", g_object_new (IDE_TYPE_ENVIRONMENT_EDITOR,
-                                                                   "environment", environ,
+                                                                   "environment", environ_,
                                                                    "visible", TRUE,
                                                                    NULL),
                                             NULL),
diff --git a/src/plugins/podman/gbp-podman-subprocess-launcher.c 
b/src/plugins/podman/gbp-podman-subprocess-launcher.c
index f8b5ffe05..2e942a15f 100644
--- a/src/plugins/podman/gbp-podman-subprocess-launcher.c
+++ b/src/plugins/podman/gbp-podman-subprocess-launcher.c
@@ -73,7 +73,7 @@ gbp_podman_subprocess_launcher_spawn (IdeSubprocessLauncher  *launcher,
 
   if (!g_strv_contains (argv, "podman"))
     {
-      const gchar * const *environ;
+      const gchar * const *environ_;
       const gchar *cwd;
       guint i = 0;
       gint max_fd;
@@ -125,12 +125,12 @@ gbp_podman_subprocess_launcher_spawn (IdeSubprocessLauncher  *launcher,
           copy_envvar (launcher, i++, "XDG_VTNR");
         }
 
-      if ((environ = ide_subprocess_launcher_get_environ (launcher)))
+      if ((environ_ = ide_subprocess_launcher_get_environ (launcher)))
         {
-          for (guint j = 0; environ[j]; j++)
+          for (guint j = 0; environ_[j]; j++)
             {
               ide_subprocess_launcher_insert_argv (launcher, i++, "--env");
-              ide_subprocess_launcher_insert_argv (launcher, i++, environ[j]);
+              ide_subprocess_launcher_insert_argv (launcher, i++, environ_[j]);
             }
 
           ide_subprocess_launcher_set_environ (launcher, NULL);


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