Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Sep 1999 16:24:07 +0200 (CEST)
From:      Dominik Rothert <dr@domix.de>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/14013: bounce-1.0 compilation
Message-ID:  <199909281424.QAA02042@domix.de>

next in thread | raw e-mail | index | archive | help

>Number:         14013
>Category:       ports
>Synopsis:       bounce-1.0 compilation
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Sep 28 07:30:00 PDT 1999
>Closed-Date:
>Last-Modified:
>Originator:     Dominik Rothert
>Release:        FreeBSD 4.0-CURRENT i386
>Organization:
Am I organized?
>Environment:
>Description:

	When you try to compile the bounce-1.0 port (/usr/ports/net/bounce),
	you'll get two compiler warnings:

	bounce.c:186: warning: passing arg 2 of 
	`bind' from incompatible pointer type

	bounce.c:206: warning: passing arg 2 of 
	`accept' from incompatible pointer type

>How-To-Repeat:

	cd /usr/ports/net/bounce ; make

>Fix:
	
	I've done a little patch which changes bounce.c:186
	'if (bind(srv_fd,&srv_addr,sizeof(srv_addr))==-1) {' to
	'if (bind(srv_fd,(struct sockaddr *)&srv_addr,sizeof(srv_addr))==-1) {'
	and bounce.c:206 'rem_fd=accept(srv_fd,&rem_addr,&len);' to
	'rem_fd=accept(srv_fd,(struct sockaddr *)&rem_addr,&len);' 

	here's the patch: 

	--- bounce.c.orig       Tue Sep 28 16:01:01 1999
	+++ bounce.c    Tue Sep 28 16:01:40 1999
	@@ -183,7 +183,7 @@
		 srv_addr.sin_addr.s_addr=htonl(INADDR_ANY);
		 srv_addr.sin_port=htons(myport);
		 srv_fd=socket(PF_INET,SOCK_STREAM,0);
	-    if (bind(srv_fd,&srv_addr,sizeof(srv_addr))==-1) {
	+    if (bind(srv_fd,(struct sockaddr *)&srv_addr,sizeof(srv_addr))==-1) {
		perror("bind");
			 exit(-1);
		}
	@@ -203,7 +203,7 @@
		 if (fork()) exit(0);
		 while (1) {
		len=sizeof(rem_addr);
	-   rem_fd=accept(srv_fd,&rem_addr,&len);
	+   rem_fd=accept(srv_fd,(struct sockaddr *)&rem_addr,&len);
		if (rem_fd<0) {
		  if (errno==EINTR) continue;
		  exit(-1);
	

>Release-Note:
>Audit-Trail:
>Unformatted:
 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199909281424.QAA02042>