diff options
Diffstat (limited to 'lib/libcapsicum/capsicum_helpers.h')
-rw-r--r-- | lib/libcapsicum/capsicum_helpers.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/libcapsicum/capsicum_helpers.h b/lib/libcapsicum/capsicum_helpers.h index f137ec1806f9..a6c696aa9a8e 100644 --- a/lib/libcapsicum/capsicum_helpers.h +++ b/lib/libcapsicum/capsicum_helpers.h @@ -133,8 +133,17 @@ caph_limit_stdio(void) 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 cache them is to call the function directly. + */ + delta = 0; + (void)gmtime(&delta); } static __inline void |