diff --git a/lib/libcapsicum/capsicum_helpers.h b/lib/libcapsicum/capsicum_helpers.h --- a/lib/libcapsicum/capsicum_helpers.h +++ b/lib/libcapsicum/capsicum_helpers.h @@ -133,8 +133,17 @@ static __inline void caph_cache_tzdata(void) { + time_t delta; tzset(); + + /* + * The tzset() function does not cache all time zones. + * Some functions, such as gmtime(), require a GMT time zone. + * The only way to chache them is to call funtion directly. + */ + delta = 0; + (void)gmtime(&delta); } static __inline void