git: c1b6110df040 - releng/14.0 - tcpdump: Initialize tzcode early.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 19 Sep 2023 10:47:15 UTC
The branch releng/14.0 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=c1b6110df0405b53e0191c5cea42a85dc19ffe46 commit c1b6110df0405b53e0191c5cea42a85dc19ffe46 Author: Dag-Erling Smørgrav <des@FreeBSD.org> AuthorDate: 2023-09-15 21:36:41 +0000 Commit: Dag-Erling Smørgrav <des@FreeBSD.org> CommitDate: 2023-09-19 10:45:29 +0000 tcpdump: Initialize tzcode early. An explicit tzset() call is usually not needed as it happens implicitly the first time we call localtime() or mktime(), but in some cases (sandboxing, chroot) this may be too late. PR: 273807 MFC after: 3 days Reviewed by: jrm Differential Revision: https://reviews.freebsd.org/D41880 Approved by: re (kib) (cherry picked from commit 7e0a7ef95fac1183854cab662bd9afa4647422d6) (cherry picked from commit 51d54ed6151b5381bca703d85762d9d054463003) --- contrib/tcpdump/tcpdump.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/tcpdump/tcpdump.c b/contrib/tcpdump/tcpdump.c index 52209fedb999..8cfcb04fc093 100644 --- a/contrib/tcpdump/tcpdump.c +++ b/contrib/tcpdump/tcpdump.c @@ -1564,6 +1564,8 @@ main(int argc, char **argv) if (abort_on_misalignment(ebuf, sizeof(ebuf)) < 0) error("%s", ebuf); + tzset(); + while ( (op = getopt_long(argc, argv, SHORTOPTS, longopts, NULL)) != -1) switch (op) {