Bug 70202

Summary: Fix for ftp/tnftpd with new gcc 3.4
Product: Ports & Packages Reporter: Rudolf Čejka <cejkar>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Rudolf Čejka 2004-08-09 10:10:00 UTC
 
 There is a problem with compilation of ftp/tnftpd with new gcc 3.4.
 Simple patch to ftp/tnftpd/files/patch-src-logwtmp.c should help:
 
 --- patch-src-logwtmp.c.orig	Mon Aug  9 10:17:10 2004
 +++ patch-src-logwtmp.c	Mon Aug  9 10:16:27 2004
 @@ -43,7 +43,7 @@
  +				NI_NUMERICHOST);
  +			host = hostbuf;
  +			if (strlen(host) > UT_HOSTSIZE)
 -+				host[UT_HOSTSIZE] = '\0';
 ++				hostbuf[UT_HOSTSIZE] = '\0';
  +		}
  +	}
 
 As you see, change from host[] to hostbuf[] assignment right after
 host = hostbuf is semantically nop operation, but host is defined
 as const, so new gcc compiler issues an error when host is used, so
 we have to change it to hostbuf.
Comment 1 Tilman Keskinoz freebsd_committer freebsd_triage 2004-08-10 17:19:09 UTC
State Changed
From-To: open->closed

committed, thanks