Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F159399386
D52240.id161195.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
899 B
Referenced Files
None
Subscribers
None
D52240.id161195.diff
View Options
diff --git a/contrib/tzcode/localtime.c b/contrib/tzcode/localtime.c
--- a/contrib/tzcode/localtime.c
+++ b/contrib/tzcode/localtime.c
@@ -1624,14 +1624,14 @@
static void
tzset_unlocked(void)
{
+ char const *name = getenv("TZ");
#ifdef __FreeBSD__
- tzset_unlocked_name(getenv("TZ"));
+ tzset_unlocked_name(name);
}
static void
tzset_unlocked_name(char const *name)
{
-#else
- char const *name = getenv("TZ");
+ int tzloadflags = TZLOAD_TZSTRING | (name ? TZLOAD_FROMENV : 0);
#endif
struct state *sp = lclptr;
int lcl = name ? strlen(name) < sizeof lcl_TZname : -1;
@@ -1647,7 +1647,11 @@
lclptr = sp = malloc(sizeof *lclptr);
# endif
if (sp) {
+#ifdef __FreeBSD__
+ if (zoneinit(sp, name, tzloadflags) != 0) {
+#else
if (zoneinit(sp, name, TZLOAD_FROMENV | TZLOAD_TZSTRING) != 0) {
+#endif
zoneinit(sp, "", 0);
strcpy(sp->chars, UNSPEC);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jun 14, 5:53 PM (10 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33957037
Default Alt Text
D52240.id161195.diff (899 B)
Attached To
Mode
D52240: tzcode: Don't treat TZDEFAULT as tainted
Attached
Detach File
Event Timeline
Log In to Comment