From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Sep 13 19:30:08 2009 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49E431065672 for ; Sun, 13 Sep 2009 19:30:08 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 269428FC1B for ; Sun, 13 Sep 2009 19:30:08 +0000 (UTC) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n8DJU87t095051 for ; Sun, 13 Sep 2009 19:30:08 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n8DJU7Qf095050; Sun, 13 Sep 2009 19:30:07 GMT (envelope-from gnats) Resent-Date: Sun, 13 Sep 2009 19:30:07 GMT Resent-Message-Id: <200909131930.n8DJU7Qf095050@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Martin Laabs Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91F0E106566B for ; Sun, 13 Sep 2009 19:23:06 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 811688FC13 for ; Sun, 13 Sep 2009 19:23:06 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n8DJN5Q3096721 for ; Sun, 13 Sep 2009 19:23:05 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id n8DJN5ot096720; Sun, 13 Sep 2009 19:23:05 GMT (envelope-from nobody) Message-Id: <200909131923.n8DJN5ot096720@www.freebsd.org> Date: Sun, 13 Sep 2009 19:23:05 GMT From: Martin Laabs To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/138786: x11-toolkits/plib unable to connect to network X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Sep 2009 19:30:08 -0000 >Number: 138786 >Category: ports >Synopsis: x11-toolkits/plib unable to connect to network >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Sep 13 19:30:07 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Martin Laabs >Release: 7.2-STABLE >Organization: >Environment: FreeBSD pc.martinlaabs.de 7.2-STABLE FreeBSD 7.2-STABLE #1: Sat Aug 15 18:48:58 CEST 2009 martin@pc.martinlaabs.de:/usr/obj/usr/src/sys/GENERIC i386 >Description: Every program which uses the netSocket class of plib seems to be unable to connect to the network. In my opinion this is because of these lines in netSocket.h: class netAddress { /* DANGER!!! This MUST match 'struct sockaddr_in' exactly! */ short sin_family ; unsigned short sin_port ; unsigned int sin_addr ; char sin_zero [ 8 ] ; [...] This data structure does not match the sockaddr_in of freebsd. >How-To-Repeat: #include #include main() { char msg[50]="blablabla\n"; unsigned int len=25; const char host[]="127.0.0.1"; int port = 5000; netInit (); netSocket *sock = new netSocket () ; cout << "open " << sock -> open ( false ) << "\n"; cout << "blocking " << sock -> setBlocking(false) << "\n"; cout << "connect " << sock -> connect ( host, port ) << "\n" ; sock -> send ( msg, len, 0 ); } g++ -I/usr/local/include test.c -lplibnet -L /usr/local/lib >Fix: >Release-Note: >Audit-Trail: >Unformatted: