Browse Source

glib: Format gtimezone.c patch as upstream wants

android-5
Fredrik Fornwall 7 years ago
parent
commit
022cbc0fc0
  1. 7
      packages/glib/glib-gtimezone.c.patch

7
packages/glib/glib-gtimezone.c.patch

@ -17,7 +17,7 @@ diff -u -r ../glib-2.54.2/glib/gtimezone.c ./glib/gtimezone.c
/**
* SECTION:timezone
* @title: GTimeZone
@@ -392,7 +399,105 @@
@@ -392,7 +399,106 @@
gtz->transitions = NULL;
}
@ -48,18 +48,19 @@ diff -u -r ../glib-2.54.2/glib/gtimezone.c ./glib/gtimezone.c
+ } __attribute__((packed)) entry;
+
+ char sys_timezone[PROP_VALUE_MAX];
+ int tzdata_fd;
+
+ if (identifier == NULL)
+ {
+ if (__system_property_get ("persist.sys.timezone", sys_timezone) < 1)
+ {
+ g_warning("__system_property_get(\"persist.sys.timezone\") failed\n");
+ g_warning ("__system_property_get(\"persist.sys.timezone\") failed");
+ return NULL;
+ }
+ identifier = sys_timezone;
+ }
+
+ int tzdata_fd = open("/system/usr/share/zoneinfo/tzdata", O_RDONLY);
+ tzdata_fd = open ("/system/usr/share/zoneinfo/tzdata", O_RDONLY);
+ if (tzdata_fd < 0)
+ {
+ g_warning ("Failed opening tzdata");

Loading…
Cancel
Save