From owner-freebsd-net Thu Jan 25 3:51:25 2001 Delivered-To: freebsd-net@freebsd.org Received: from paprika.michvhf.com (adsl-pool23-22.detroit.mi.ameritech.net [64.108.56.22]) by hub.freebsd.org (Postfix) with SMTP id AFEE437B400 for ; Thu, 25 Jan 2001 03:51:06 -0800 (PST) Received: (qmail 11282 invoked by uid 1001); 25 Jan 2001 11:51:06 -0000 Date: Thu, 25 Jan 2001 06:51:06 -0500 (EST) From: Vince Vielhaber To: John Cc: Subject: Re: problems compiling raw socket program In-Reply-To: <20010125094243.7042.qmail@web3005.mail.yahoo.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Thu, 25 Jan 2001, John wrote: > Hi > > I tried that as you had advised, but the error remains > the same. Rearrange your includes like this: #include #include #include #include #include #include #include #include #include #include #include #include and it'll compile, but the link fails with: undefined reference to `csum' missing library, but I didn't bother looking to see what. Vince. > > bash-2.03$ gcc -o rawsocket rawsocket.c > In file included from rawsocket.c:7: > /usr/include/netinet/ip.h:152: parse error before > `n_long' > /usr/include/netinet/ip.h:152: warning: no semicolon > at end of struct or union > /usr/include/netinet/ip.h:152: warning: no semicolon > at end of struct or union > /usr/include/netinet/ip.h:155: parse error before > `n_long' > /usr/include/netinet/ip.h:155: warning: no semicolon > at end of struct or union > /usr/include/netinet/ip.h:156: warning: data > definition has no type or storage class > /usr/include/netinet/ip.h:157: parse error before `}' > /usr/include/netinet/ip.h:157: warning: data > definition has no type or storage class > /usr/include/netinet/ip.h:158: parse error before `}' > bash-2.03$ > > > > --- Wilbert de Graaf wrote: > > > Can anyone enlighten me on why I can't compile? > > > > It tells you some types are missing so you need to > > add one or more headers. > > This will probably do it: #include > > > > > > Wilbert > > > > > > > __________________________________________________ > Do You Yahoo!? > Yahoo! Auctions - Buy the things you want at great prices. > http://auctions.yahoo.com/ > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-net" in the body of the message > -- ========================================================================== Vince Vielhaber -- KA8CSH email: vev@michvhf.com http://www.pop4.net 128K ISDN from $22.00/mo - 56K Dialup from $16.00/mo at Pop4 Networking Online Campground Directory http://www.camping-usa.com Online Giftshop Superstore http://www.cloudninegifts.com ========================================================================== To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message