Bug 70202 - Fix for ftp/tnftpd with new gcc 3.4
Summary: Fix for ftp/tnftpd with new gcc 3.4
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-09 10:10 UTC by Rudolf Čejka
Modified: 2004-08-10 17:19 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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