rpms/tftp/devel tftp-hpa-0.39-tzfix.patch, NONE, 1.1 tftp.spec, 1.31, 1.32

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Mon Apr 10 16:13:45 UTC 2006


Author: rvokal

Update of /cvs/dist/rpms/tftp/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv16200

Modified Files:
	tftp.spec 
Added Files:
	tftp-hpa-0.39-tzfix.patch 
Log Message:
- show localtime instead of GMT (#172274)

tftp-hpa-0.39-tzfix.patch:
 tftpd.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletion(-)

--- NEW FILE tftp-hpa-0.39-tzfix.patch ---
--- tftp-hpa-0.39/tftpd/tftpd.c.old	2004-09-15 00:38:46.000000000 +0200
+++ tftp-hpa-0.39/tftpd/tftpd.c	2006-04-10 17:26:31.000000000 +0200
@@ -286,7 +286,14 @@
   char *rewrite_file = NULL;
 #endif
   u_short tp_opcode;
-
+  time_t my_time = 0;
+  struct tm* p_tm;
+  char envtz[10];
+  my_time = time(NULL);
+  p_tm = localtime(&my_time);
+  snprintf(envtz, sizeof(envtz) - 1, "UTC%+d", (p_tm->tm_gmtoff * -1)/3600);
+  setenv("TZ", envtz, 0);
+  
   /* basename() is way too much of a pain from a portability standpoint */
 
   p = strrchr(argv[0], '/');


Index: tftp.spec
===================================================================
RCS file: /cvs/dist/rpms/tftp/devel/tftp.spec,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- tftp.spec	22 Mar 2006 11:04:02 -0000	1.31
+++ tftp.spec	10 Apr 2006 16:13:43 -0000	1.32
@@ -3,12 +3,13 @@
 Summary: The client for the Trivial File Transfer Protocol (TFTP).
 Name: tftp
 Version: %{tftp_hpa_version}
-Release: 2
+Release: 3
 License: BSD
 Group: Applications/Internet
 Source0: http://www.kernel.org/pub/software/network/tftp/tftp-hpa-%{tftp_hpa_version}.tar.gz
 Patch0: tftp-0.40-remap.patch
 Patch1: tftp-hpa-0.42-sigjmp.patch
+Patch2: tftp-hpa-0.39-tzfix.patch
 BuildPreReq: tcp_wrappers
 BuildRoot: %{_tmppath}/%{name}-root
 
@@ -36,6 +37,7 @@
 %setup -q -n tftp-hpa-%{version} 
 %patch0 -p1 -b .zero
 %patch1 -p1 -b .sigjmp
+%patch2 -p1 -b .tzfix
 
 %build
 
@@ -78,6 +80,9 @@
 %{_mandir}/man8/*
 
 %changelog
+* Mon Apr 10 2006 Radek Vokál <rvokal at redhat.com> 0.42-3
+- show localtime instead of GMT (#172274)
+
 * Wed Mar 22 2006 Radek Vokál <rvokal at redhat.com> 0.42-2
 - fix double free error when hitting ^C (#186201)
 




More information about the fedora-cvs-commits mailing list