freerdp: Add support for tz package
authorScott Fan <fancp2007@gmail.com>
Tue, 28 Jul 2015 08:25:16 +0000 (16:25 +0800)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thu, 30 Jul 2015 21:37:26 +0000 (23:37 +0200)
Fixes error message while freerdp connected the remote desktop:
Unable to detect time zone

Signed-off-by: Scott Fan <fancp2007@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/freerdp/0004-add-support-for-tz-package.patch [new file with mode: 0644]

diff --git a/package/freerdp/0004-add-support-for-tz-package.patch b/package/freerdp/0004-add-support-for-tz-package.patch
new file mode 100644 (file)
index 0000000..93e4afd
--- /dev/null
@@ -0,0 +1,30 @@
+From 605d0a85183d2f9d5b0da5629cbadf01173bbb2f Mon Sep 17 00:00:00 2001
+From: Scott Fan <fancp2007@gmail.com>
+Date: Mon, 13 Jul 2015 15:01:17 +0800
+Subject: [PATCH] Add support for tz package
+
+Fixes error message while freerdp connected the remote desktop:
+Unable to detect time zone
+
+Signed-off-by: Scott Fan <fancp2007@gmail.com>
+---
+ libfreerdp/locale/timezone.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/libfreerdp/locale/timezone.c b/libfreerdp/locale/timezone.c
+index 3070f1f..4a06786 100644
+--- a/libfreerdp/locale/timezone.c
++++ b/libfreerdp/locale/timezone.c
+@@ -1539,7 +1539,8 @@ char* freerdp_get_unix_timezone_identifier()
+        * America/Montreal for example.
+        */
+       
+-      if ((len = readlink("/etc/localtime", buf, sizeof(buf) - 1)) != -1)
++      if ((len = readlink("/etc/localtime", buf, sizeof(buf) - 1)) != -1 ||
++          (len = readlink("/etc/TZ", buf, sizeof(buf) - 1)) != -1)
+       {
+               int num = 0;
+               int pos = len;
+-- 
+2.4.5
+