From owner-freebsd-ports Tue Sep 28 7:30: 5 1999 Delivered-To: freebsd-ports@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 0BDD71548B for ; Tue, 28 Sep 1999 07:30:00 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id HAA64253; Tue, 28 Sep 1999 07:30:00 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from mail2.netcologne.de (mail2.netcologne.de [194.8.194.103]) by hub.freebsd.org (Postfix) with ESMTP id 22EB315567 for ; Tue, 28 Sep 1999 07:25:46 -0700 (PDT) (envelope-from dr@domix.de) Received: from lamest.domix.de (dial-as58-rs1-203.netcologne.de [195.14.226.203]) by mail2.netcologne.de (8.9.3/8.9.3) with ESMTP id QAA12542 for ; Tue, 28 Sep 1999 16:25:44 +0200 (MET DST) Received: from domix.de (speed.localnet.lan [192.168.1.2]) by lamest.domix.de (8.9.3/8.9.3) with ESMTP id QAA01115 for ; Tue, 28 Sep 1999 16:16:42 +0200 (CEST) (envelope-from dr@domix.de) Received: (from dr@localhost) by domix.de (8.9.3/8.9.3) id QAA02042; Tue, 28 Sep 1999 16:24:07 +0200 (CEST) (envelope-from dr) Message-Id: <199909281424.QAA02042@domix.de> Date: Tue, 28 Sep 1999 16:24:07 +0200 (CEST) From: Dominik Rothert Reply-To: Dominik Rothert To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: ports/14013: bounce-1.0 compilation Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >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