1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-19 19:59:43 +00:00

When call tzset() before openlog so we log in local time instead of UTC.

This matches the behavior of /usr/libexec/tftpd.

Submitted by:	Hiroshi Fujishima <hirobo at tonteki dot org>
PR:		ports/116455
This commit is contained in:
Brooks Davis 2007-12-28 22:11:54 +00:00
parent 7147851c93
commit 829ed937f8
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=204665
2 changed files with 16 additions and 0 deletions

View File

@ -7,6 +7,7 @@
PORTNAME= tftp-hpa
PORTVERSION= 0.48
PORTREVISION= 1
CATEGORIES= ftp
MASTER_SITES= ftp://ftp.kernel.org/pub/software/network/tftp/

View File

@ -0,0 +1,15 @@
$FreeBSD$
--- tftpd/tftpd.c.orig
+++ tftpd/tftpd.c
@@ -302,6 +302,9 @@
p = strrchr(argv[0], '/');
__progname = (p && p[1]) ? p+1 : argv[0];
+
+ /* syslog in localtime */
+ tzset();
openlog(__progname, LOG_PID|LOG_NDELAY, LOG_DAEMON);