Bug 94283

Summary: [MAINTAINER] net/cnet: make it usable with modern GCCs
Product: Ports & Packages Reporter: Ion-Mihai " IOnut " Tetcu <itetcu>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed FIXED    
Severity: Affects Only Me CC: chris
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
cnet.diff none

Description Ion-Mihai " IOnut " Tetcu 2006-03-09 20:30:03 UTC

While the port compiles and installs/deinstalls OK, on systems with "modern" gcc
versions (like 5 and 6) the resulting binary is unusable.

Fix this by updating to the latest version.

Tinderbox tested:	 on 4,5,6,7-STABLE. 
Brett, please do a folloup to this PR if you still have problems with it
(and please do it fast, otherwise I will asume all is OK and try to sneak in
this version for 5 and 6 upcoming releases)

Obtain from:		 Chris McDonald <chris@csse.uwa.edu.au> (author), with big thanks for quick response.
Reported by:		"B .Wiggins" <synack@netspace.net.au>

How-To-Repeat: 

On a 5.x, 6.x or HEAD system do:
cd /usr/ports/net/cnet/ && make install clean
then try to use the program with any topology file, like:
cnet -d T2

2 hosts, 0 routers and 1 link

/usr/bin/gcc -ansi -Werror -Wall -fPIC -DFREEBSD -DHAVE_LONG_LONG=1 
-DSIZEOF_INT=4 -DSIZEOF_LONG=4 -I/usr/local/share/cnet -c -o 
stopandwait.o stopandwait.c


stopandwait.c: In function `transmit_frame':
stopandwait.c:78: warning: passing arg 2 of `CNET_exit' discards 
qualifiers from pointer target type
stopandwait.c: In function `application_ready':
stopandwait.c:87: warning: passing arg 2 of `CNET_exit' discards 
qualifiers from pointer target type
stopandwait.c: In function `physical_ready':
stopandwait.c:102: warning: passing arg 2 of `CNET_exit' discards 
qualifiers from pointer target type
stopandwait.c:124: warning: passing arg 2 of `CNET_exit' discards 
qualifiers from pointer target type
stopandwait.c: In function `reboot_node':
stopandwait.c:179: warning: passing arg 2 of `CNET_exit' discards 
qualifiers from pointer target type
stopandwait.c:180: warning: passing arg 2 of `CNET_exit' discards 
qualifiers from pointer target type
stopandwait.c:181: warning: passing arg 2 of `CNET_exit' discards 
qualifiers from pointer target type
stopandwait.c:182: warning: passing arg 2 of `CNET_exit' discards 
qualifiers from pointer target type
stopandwait.c:183: warning: passing arg 2 of `CNET_exit' discards 
qualifiers from pointer target type
stopandwait.c:185: warning: passing arg 2 of `CNET_exit' discards 
qualifiers from pointer target type
Comment 1 B .Wiggins 2006-03-10 03:51:35 UTC
Hi Ion-Mihai,
                      used pkg_deinstall to remove the installed port. 
Applied the diff patch and reinstalled the port. Cnet is now working 
without a problem.  Many Thanks to yourself and Dr Chris McDonald for 
helping fix this port.
Comment 2 Erwin Lansing freebsd_committer freebsd_triage 2006-03-10 17:35:52 UTC
State Changed
From-To: open->closed

Committed, thanks!