From owner-freebsd-questions@FreeBSD.ORG Wed Mar 26 14:26:51 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6AEBA37B405 for ; Wed, 26 Mar 2003 14:26:51 -0800 (PST) Received: from mailsrv.otenet.gr (mailsrv.otenet.gr [195.170.0.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2347C43F85 for ; Wed, 26 Mar 2003 14:26:45 -0800 (PST) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.gr (patr530-a161.otenet.gr [212.205.215.161]) by mailsrv.otenet.gr (8.12.8/8.12.8) with ESMTP id h2QMPvh1024706; Thu, 27 Mar 2003 00:26:23 +0200 (EET) Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.12.8/8.12.8) with ESMTP id h2QMPbOD020307; Thu, 27 Mar 2003 00:25:37 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.gr (8.12.8/8.12.8/Submit) id h2QMPbmY020306; Thu, 27 Mar 2003 00:25:37 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Thu, 27 Mar 2003 00:25:37 +0200 From: Giorgos Keramidas To: Jesus Daniel Valencia Sanchez Message-ID: <20030326222537.GB19762@gothmog.gr> References: <20030326034042.GA16205@gothmog.gr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-RAVMilter-Version: 8.4.2(snapshot 20021217) (terpsi) X-Spam-Status: No, hits=-25.3 required=5.0 tests=AWL,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, RCVD_IN_UNCONFIRMED_DSBL,REFERENCES,REPLY_WITH_QUOTES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) cc: freebsd-questions@FreeBSD.org Subject: Re: sockets X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Mar 2003 22:26:52 -0000 On 2003-03-26 09:37, Jesus Daniel Valencia Sanchez wrote: >On Wed, 26 Mar 2003, Giorgos Keramidas wrote: >>On 2003-03-25 19:07, Jesus Daniel Valencia Sanchez wrote: >>> >>> I'm using R4.6.2 and when i try to compile anything with the file >>> sys/socket.h i get tons of error messages INSIDE that file. is >>> there anything i should know about it? >>> >>> any help will be very appreciated >> >> Show us the exact command-line options you're using to compile your >> programs with and the errors you're getting. > > here you go > > [Equipo7] ~/programas/tontos> uname -a > FreeBSD Equipo7.mat.uson.mx 4.6.2-RELEASE FreeBSD 4.6.2-RELEASE #0: Thu > Feb 6 20:03:17 MST 2003 > root@Equipo7.mat.uson.mx:/usr/src/sys/compile/GENERIC i386 > [Equipo7] ~/programas/tontos> g++ -o server_1 server_1.cpp > In file included from server_1.cpp:1: > /usr/include/sys/socket.h:52: syntax error before `;' Line 52 of in 4.6.2-RELEASE contains: 49 /* 50 * Data types. 51 */ 52 typedef u_char sa_family_t; 53 #ifdef _BSD_SOCKLEN_T_ 54 typedef _BSD_SOCKLEN_T_ socklen_t; 55 #undef _BSD_SOCKLEN_T_ 56 #endif Make sure you include before . > [Equipo7] ~/programas/tontos> cat server_1.cpp > #include > #include Wrong header order. The header uses some of the types that are defined in . > #include > #include > > void error( char *s ) > { > . > . > . > and my code goes on... PS: When you reply to a post, it's a good idea to Cc: both the list and the original sender. I would have missed your followup post, if I hadn't been looking at the subjects of the list carefully enough.