On Sat, Aug 06, 2005 at 06:34:40PM -0300, Arnaldo Carvalho de Melo wrote:
> On 8/6/05, Harald Welte <[EMAIL PROTECTED]> wrote:
> > Hi Arnaldo!
> > 
> > The protocol header files in <linux/foo.h> are usually structured in a
> > way to be included by userspace code.  The top section consists of
> > general protocol structure definitions, typedefs, enums - followed by an
> > #ifdef __KERNEL__ section.
> > 
> > Currently <linux/dccp.h> doesn't follow that convention and can
> > therefore not be used from userspace.  However, e.g. iptables'
> > libipt_dccp.c actually needs various definitions.
> > 
> > Below is a proposed patch to clean up dccp.h.  Please review and
> > consider applying it.  Thanks!
> > 
> > [the iptables ipt_dccp patch applies cleanly on top of this - but not
> >  the other way around]
> 
> OK, I'm applying both patches, just had to add an include for linux/in.h that
> was missing, thanks!

you cannot include linux/in.h from the top of the file, I think I tried
that and ran into problems (the definitions collide with glibc
definitions e.g. of sockaddr_in, etc.)

So if possible, move that include down to the __KERNEL__ section.  At
least this way iptables libipt_dccp.c compiles.

> - Arnaldo

-- 
- Harald Welte <[EMAIL PROTECTED]>                      http://gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
                                                  (ETSI EN 300 175-7 Ch. A6)

Attachment: pgpFp6ckZeHAf.pgp
Description: PGP signature

Reply via email to