summaryrefslogtreecommitdiff
path: root/user/mate-sensors-applet/locale-guards.patch
diff options
context:
space:
mode:
authorA. Wilcox <awilcox@wilcox-tech.com>2020-02-16 21:13:53 +0000
committerA. Wilcox <awilcox@wilcox-tech.com>2020-02-16 21:13:53 +0000
commitdbbc5072f5c2b428de142604b9c1c70b4159a845 (patch)
treea3956d8d7cc74f020d042e34eb808a49ac4860c9 /user/mate-sensors-applet/locale-guards.patch
parent9d8715562c846a78b9679d405d136e05a2fa330f (diff)
parentca5ed52ede018f31ebfd896d367f589675e62b7e (diff)
downloadpackages-dbbc5072f5c2b428de142604b9c1c70b4159a845.tar.gz
packages-dbbc5072f5c2b428de142604b9c1c70b4159a845.tar.bz2
packages-dbbc5072f5c2b428de142604b9c1c70b4159a845.tar.xz
packages-dbbc5072f5c2b428de142604b9c1c70b4159a845.zip
Merge branch 'bumps.aerdan.20200214' into 'master'
Bumps for packages owned by Kiyoshi Aman as of 15 Feb 2020 See merge request adelie/packages!400
Diffstat (limited to 'user/mate-sensors-applet/locale-guards.patch')
-rw-r--r--user/mate-sensors-applet/locale-guards.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/user/mate-sensors-applet/locale-guards.patch b/user/mate-sensors-applet/locale-guards.patch
new file mode 100644
index 000000000..d3a35b92b
--- /dev/null
+++ b/user/mate-sensors-applet/locale-guards.patch
@@ -0,0 +1,29 @@
+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;
+ }
+