diff options
| author | Mariusz Zaborski <oshogbo@FreeBSD.org> | 2024-05-27 11:17:03 +0000 |
|---|---|---|
| committer | Mariusz Zaborski <oshogbo@FreeBSD.org> | 2024-06-28 10:20:15 +0000 |
| commit | 2c88494a336488caa3eec75a126d8b9bc23c20b0 (patch) | |
| tree | 1d357ba2f508a483d6b56c8650bd51ec1b80587a /lib/libcapsicum | |
| parent | 944827bcf6f0b7db74d47e18885d327a623ef6b7 (diff) | |
Diffstat (limited to 'lib/libcapsicum')
| -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 |
