--- tftpd/tftpd.c.orig	2011-08-14 07:51:37.000000000 +0200
+++ tftpd/tftpd.c	2011-08-14 07:46:47.000000000 +0200
@@ -76,7 +76,7 @@
 #define TRIES   6               /* Number of attempts to send each packet */
 #define TIMEOUT_LIMIT ((1 << TRIES)-1)
 
-const char *__progname;
+const char *tftpd_progname;
 static int peer;
 static unsigned long timeout  = TIMEOUT;        /* Current timeout value */
 static unsigned long rexmtval = TIMEOUT;       /* Basic timeout value */
@@ -387,10 +387,10 @@
     /* basename() is way too much of a pain from a portability standpoint */
 
     p = strrchr(argv[0], '/');
-    __progname = (p && p[1]) ? p + 1 : argv[0];
-
-    openlog(__progname, LOG_PID | LOG_NDELAY, LOG_DAEMON);
-
+    tftpd_progname = (p && p[1]) ? p + 1 : argv[0];
+    tzset();
+    openlog(tftpd_progname, LOG_PID | LOG_NDELAY, LOG_FTP);
+    
     srand(time(NULL) ^ getpid());
 
     while ((c = getopt_long(argc, argv, short_options, long_options, NULL))
@@ -938,14 +938,14 @@
        syslog daemon gets restarted by the time we get here. */
     if (secure && standalone) {
         closelog();
-        openlog(__progname, LOG_PID | LOG_NDELAY, LOG_DAEMON);
+        openlog(tftpd_progname, LOG_PID | LOG_NDELAY, LOG_FTP);
     }
 
 #ifdef HAVE_TCPWRAPPERS
     /* Verify if this was a legal request for us.  This has to be
        done before the chroot, while /etc is still accessible. */
     request_init(&wrap_request,
-                 RQ_DAEMON, __progname,
+                 RQ_DAEMON, tftpd_progname,
                  RQ_FILE, fd,
                  RQ_CLIENT_SIN, &from, RQ_SERVER_SIN, &myaddr, 0);
     sock_methods(&wrap_request);
