freebsd-ports/ftp/tftp-hpa/files/patch-tftpd_tftpd.c
Brooks Davis 42ec65c154 Upgrade to 0.49:
Add IPv6 support.
	Support systems with editline instead of readline.
	Support long options in the server.

Prodded by:	portscout (via miwi)
2009-02-13 17:28:49 +00:00

26 lines
783 B
C

$FreeBSD$
--- tftpd/tftpd.c.orig
+++ tftpd/tftpd.c
@@ -355,7 +355,10 @@
p = strrchr(argv[0], '/');
__progname = (p && p[1]) ? p + 1 : argv[0];
- openlog(__progname, LOG_PID | LOG_NDELAY, LOG_DAEMON);
+ /* syslog in localtime */
+ tzset();
+
+ openlog(__progname, LOG_PID | LOG_NDELAY, LOG_FTP);
srand(time(NULL) ^ getpid());
@@ -841,7 +844,7 @@
sizeof(bindaddr4.sin_addr));
#ifdef HAVE_IPV6
} else if ((from.sa.sa_family == AF_INET6) &&
- IN6_IS_ADDR_UNSPECIFIED(SOCKADDR_P(&myaddr))) {
+ IN6_IS_ADDR_UNSPECIFIED((struct in6_addr*)SOCKADDR_P(&myaddr))) {
memcpy(SOCKADDR_P(&myaddr), &bindaddr6.sin6_addr,
sizeof(bindaddr6.sin6_addr));
#endif