diff options
author | Tudor Florea <tudor.florea@enea.com> | 2014-10-10 03:20:04 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2014-10-10 03:20:04 +0200 |
commit | 1b8dfe266937a37a4c642f96ceb2347bf4c00a17 (patch) | |
tree | 0c6aab146bb3c82efd9c7846a9a4e70dcb0ec84f /meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-0.39-tzfix.patch | |
download | meta-openembedded-daisy-140929.tar.gz |
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-0.39-tzfix.patch')
-rw-r--r-- | meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-0.39-tzfix.patch | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-0.39-tzfix.patch b/meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-0.39-tzfix.patch new file mode 100644 index 0000000000..85110eb285 --- /dev/null +++ b/meta-networking/recipes-daemons/tftp-hpa/files/tftp-hpa-0.39-tzfix.patch | |||
@@ -0,0 +1,24 @@ | |||
1 | Patch originally from Fedora | ||
2 | |||
3 | http://pkgs.fedoraproject.org/cgit/tftp.git/ | ||
4 | |||
5 | Upstream-Status: Pending | ||
6 | |||
7 | diff -up tftp-hpa-0.49/tftpd/tftpd.c.tzfix tftp-hpa-0.49/tftpd/tftpd.c | ||
8 | --- tftp-hpa-0.49/tftpd/tftpd.c.tzfix 2008-10-20 18:08:31.000000000 -0400 | ||
9 | +++ tftp-hpa-0.49/tftpd/tftpd.c 2008-11-25 11:45:27.000000000 -0500 | ||
10 | @@ -350,6 +350,14 @@ int main(int argc, char **argv) | ||
11 | const char *pidfile = NULL; | ||
12 | u_short tp_opcode; | ||
13 | |||
14 | + time_t my_time = 0; | ||
15 | + struct tm* p_tm; | ||
16 | + char envtz[10]; | ||
17 | + my_time = time(NULL); | ||
18 | + p_tm = localtime(&my_time); | ||
19 | + snprintf(envtz, sizeof(envtz) - 1, "UTC%+d", (p_tm->tm_gmtoff * -1)/3600); | ||
20 | + setenv("TZ", envtz, 0); | ||
21 | + | ||
22 | /* basename() is way too much of a pain from a portability standpoint */ | ||
23 | |||
24 | p = strrchr(argv[0], '/'); | ||