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
This commit is contained in:
Dag-Erling Smørgrav 2023-09-15 23:36:41 +02:00
parent 72d97e1dd9
commit 7e0a7ef95f

View file

@ -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) {