From owner-freebsd-ports Fri Mar 5 22: 0:26 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 9CE41150CC for ; Fri, 5 Mar 1999 22:00:15 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.2/8.9.2) id WAA05358; Fri, 5 Mar 1999 22:00:01 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from charon-e.xpeed.com (charon-e.xpeed.com [209.101.240.10]) by hub.freebsd.org (Postfix) with SMTP id 9D93315068 for ; Fri, 5 Mar 1999 21:52:07 -0800 (PST) (envelope-from timlee@xpeed.com) Received: (qmail 2172 invoked from network); 6 Mar 1999 05:51:48 -0000 Received: from styx.dsllogic.com (172.16.2.128) by charon.dsllogic.com with SMTP; 6 Mar 1999 05:51:48 -0000 Received: (from timlee@localhost) by styx.dsllogic.com (8.9.2/8.9.0) id VAA00737; Fri, 5 Mar 1999 21:51:48 -0800 (PST) Message-Id: <199903060551.VAA00737@styx.dsllogic.com> Date: Fri, 5 Mar 1999 21:51:48 -0800 (PST) From: Reply-To: timlee@netcom.com To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: ports/10414: slirp port patch Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 10414 >Category: ports >Synopsis: slirp port patch >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: Fri Mar 5 22:00:00 PST 1999 >Closed-Date: >Last-Modified: >Originator: Timothy J. Lee >Release: FreeBSD 3.1-RELEASE i386 >Organization: >Environment: AMD K6-2 PC, 64 MB memory, FreeBSD 3.1-RELEASE >Description: cd /usr/ports/net/slirp make returns ===> slirp-1.0c is marked as broken: tcp_subr.c. >How-To-Repeat: see above >Fix: The tcp_drop() function in tcp_subr.c uses errno as a local variable. This becomes something else after preprocessing (use "gcc -E [defines and stuff] tcp_subr.c" to see the problem. To fix, add the following patch (which just changes errno to err in the tcp_drop() function) to the port: *** tcp_subr.c.orig Fri Dec 29 15:45:51 1995 --- tcp_subr.c Fri Mar 5 18:19:13 1999 *************** *** 236,264 **** * Drop a TCP connection, reporting * the specified error. If connection is synchronized, * then send a RST to peer. */ struct tcpcb * ! tcp_drop(tp, errno) register struct tcpcb *tp; ! int errno; { DEBUG_CALL("tcp_drop"); DEBUG_ARG("tp = %lx", (long)tp); ! DEBUG_ARG("errno = %d", errno); if (TCPS_HAVERCVDSYN(tp->t_state)) { tp->t_state = TCPS_CLOSED; (void) tcp_output(tp); tcpstat.tcps_drops++; } else tcpstat.tcps_conndrops++; ! /* if (errno == ETIMEDOUT && tp->t_softerror) ! * errno = tp->t_softerror; */ ! /* so->so_error = errno; */ return (tcp_close(tp)); } /* * Close a TCP control block: --- 236,264 ---- * Drop a TCP connection, reporting * the specified error. If connection is synchronized, * then send a RST to peer. */ struct tcpcb * ! tcp_drop(tp, err) register struct tcpcb *tp; ! int err; { DEBUG_CALL("tcp_drop"); DEBUG_ARG("tp = %lx", (long)tp); ! DEBUG_ARG("err = %d", err); if (TCPS_HAVERCVDSYN(tp->t_state)) { tp->t_state = TCPS_CLOSED; (void) tcp_output(tp); tcpstat.tcps_drops++; } else tcpstat.tcps_conndrops++; ! /* if (err == ETIMEDOUT && tp->t_softerror) ! * err = tp->t_softerror; */ ! /* so->so_error = err; */ return (tcp_close(tp)); } /* * Close a TCP control block: >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message