diff -Nurd mate-sensors-applet-1.24.0/plugins/i2c-proc/i2c-proc-plugin.c mate-sensors-applet-1.24.0.new/plugins/i2c-proc/i2c-proc-plugin.c --- mate-sensors-applet-1.24.0/plugins/i2c-proc/i2c-proc-plugin.c 2020-02-10 07:40:35.000000000 -0500 +++ mate-sensors-applet-1.24.0.new/plugins/i2c-proc/i2c-proc-plugin.c 2020-02-15 12:50:42.395405752 -0500 @@ -144,9 +144,11 @@ gchar *old_locale = NULL; /* always use C locale */ +#ifdef HAVE_LOCALE_H if (NULL == (old_locale = setlocale(LC_NUMERIC, "C"))) { g_warning("Could not change locale to C locale for reading i2c-proc device files.. will try regardless"); } +#endif if (NULL == (fp = fopen(path, "r"))) { g_set_error(error, SENSORS_APPLET_PLUGIN_ERROR, I2C_PROC_DEVICE_FILE_OPEN_ERROR, "Error opening sensor device file %s", path); @@ -203,11 +205,11 @@ } /* end switch */ fclose(fp); } - +#ifdef HAVE_LOCALE_H if (NULL != old_locale) { setlocale(LC_NUMERIC, old_locale); } - +#endif return (gdouble)sensor_value; }