From owner-freebsd-questions@FreeBSD.ORG Thu Mar 27 10:06:06 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 1430637B401 for ; Thu, 27 Mar 2003 10:06:06 -0800 (PST) Received: from hermes.cicese.mx (hermes.cicese.mx [158.97.1.34]) by mx1.FreeBSD.org (Postfix) with ESMTP id 731B943FAF for ; Thu, 27 Mar 2003 10:06:02 -0800 (PST) (envelope-from valencia@cicese.mx) Received: from matrix.cicese.mx (matrix.cicese.mx [158.97.23.247]) by hermes.cicese.mx (8.10.0/8.10.0) with ESMTP id h2RI5r021438; Thu, 27 Mar 2003 10:05:53 -0800 (PST) Received: (from valencia@localhost) by matrix.cicese.mx (8.9.3+Sun/8.9.1) id KAA03905; Thu, 27 Mar 2003 10:05:51 -0800 (PST) Date: Thu, 27 Mar 2003 10:05:50 -0800 (PST) From: Jesus Daniel Valencia Sanchez To: Giorgos Keramidas In-Reply-To: <20030326222537.GB19762@gothmog.gr> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Status: No, hits=-20.4 required=5.0 tests=AWL,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REPLY_WITH_QUOTES,USER_AGENT_PINE 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: Thu, 27 Mar 2003 18:06:07 -0000 On Thu, 27 Mar 2003, Giorgos Keramidas wrote: > 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. > > Hello thank you very much... that was it. i wonder why didn't they #include inside sockets.h if it was needed. - have fun Daniel Valencia