--- libical-0.46/src/libical/icaltimezone.c.race	2010-08-30 21:05:06.000000000 +0100
+++ libical-0.46/src/libical/icaltimezone.c	2010-09-24 11:21:25.000000000 +0100
@@ -45,6 +45,11 @@
 
 #include <sys/stat.h>
 
+#ifdef HAVE_PTHREAD
+ #include <pthread.h>    
+    static pthread_mutex_t builtin_mutex = PTHREAD_MUTEX_INITIALIZER;
+#endif
+
 #ifdef WIN32
 #include <mbstring.h>
 #include <windows.h>
@@ -453,8 +458,7 @@ icaltimezone_ensure_coverage		(icaltimez
 
     int changes_end_year;
 
-    if (!zone->component)
-	icaltimezone_load_builtin_timezone (zone);
+    icaltimezone_load_builtin_timezone (zone);
 
     if (icaltimezone_minimum_expansion_year == -1) {
 	struct icaltimetype today = icaltime_today();
@@ -1140,8 +1144,7 @@ icaltimezone_get_tzid			(icaltimezone *z
     if (!zone)
 	return NULL;
 
-    if (!zone->tzid)
-	icaltimezone_load_builtin_timezone (zone);
+    icaltimezone_load_builtin_timezone (zone);
 
     return zone->tzid;
 }
@@ -1167,8 +1170,7 @@ icaltimezone_get_tznames		(icaltimezone 
     if (!zone)
 	return NULL;
 
-    if (!zone->component)
-	icaltimezone_load_builtin_timezone (zone);
+    icaltimezone_load_builtin_timezone (zone);
 
     return zone->tznames;
 }
@@ -1210,8 +1212,7 @@ icaltimezone_get_component		(icaltimezon
     if (!zone)
 	return NULL;
 
-    if (!zone->component)
-	icaltimezone_load_builtin_timezone (zone);
+    icaltimezone_load_builtin_timezone (zone);
 
     return zone->component;
 }
@@ -1449,8 +1450,7 @@ icaltimezone_get_builtin_timezone_from_o
     for (i=0; i<count; i++) {
 	int z_offset;
 	zone = icalarray_element_at (builtin_timezones, i);
-	if (!zone->component)
-	    icaltimezone_load_builtin_timezone (zone);
+	icaltimezone_load_builtin_timezone (zone);
 	
 	z_offset = get_offset(zone);
 
@@ -1745,6 +1745,12 @@ icaltimezone_load_builtin_timezone	(ical
     if (!zone->location || !zone->location[0])
 	return;
 
+#ifdef HAVE_PTHREAD
+    pthread_mutex_lock(&builtin_mutex);
+    if (zone->component)
+	goto out;
+#endif
+
 #ifdef USE_BUILTIN_TZDATA
     {
     char *filename;
@@ -1802,7 +1808,10 @@ icaltimezone_load_builtin_timezone	(ical
     icalcomponent_free(comp);
     }
 #endif    
-
+#ifdef HAVE_PTHREAD
+ out:
+    pthread_mutex_unlock(&builtin_mutex);
+#endif
 }
 
 
