No, that's not the correct fix.  The original fix was just a cast and had no 
effect other than to appease the compiler.  Your proposed fix makes the code do 
something different.


--- On Sun, 1/30/11, Joonwoo Park <[email protected]> wrote:

> From: Joonwoo Park <[email protected]>
> Subject: Re: [Click] Doing some research
> To: "Bobby Longpocket" <[email protected]>, "Outback Dingo" 
> <[email protected]>
> Cc: [email protected]
> Date: Sunday, January 30, 2011, 2:00 PM
> Hi,
> 
> Presumably this wouldn't affect to anything as radix tree
> is not being used anyware from click.  But it seems to
> me below is correct fix.
> 150c150
> <       return
> rcu_dereference(*pslot);
> ---
> >       return (void
> *)rcu_dereference(*(int **)&pslot);
> 176c176
> <   
>    rcu_assign_pointer(*pslot, item);
> ---
> >   
>    rcu_assign_pointer(*(int **)&pslot,
> (int *)item);
> 
> Dingo, if you have chance, please try patch serise that I
> posted yesterday.  It should work with linux 2.6.37.
> 
> Joonwoo
> 
> On Mon, Jan 24, 2011 at 10:33:57PM -0800, Bobby Longpocket
> wrote:
> > Dingo:
> > 
> > Click patchless has a problem with 2.6.37.  In
> radix-tree.h there's a call to a macro that ends up trying
> to dereference a void*.  The C++ compiler doesn't like
> this.  You can apply the following changes to
> click/include/click-linuxmodule/include1/linux/radix-tree.h
> to make more progress with your compilation:
> > 
> > 150c150
> > <     return
> rcu_dereference(*pslot);
> > ---
> > >     return (void
> *)rcu_dereference(*(int **)pslot);
> > 176c176
> > <     rcu_assign_pointer(*pslot,
> item);
> > ---
> > >     rcu_assign_pointer(*(int
> **)pslot, (int *)item);
> > 
> > 
> > 
> > ----------------
> > as for linux-2.6.37, any ideas ? and another note how
> does one enable
> > elements --enable-wifi (./configure --fix-includes
> --enable-wifi ) ??
> > 
> > today i cloned latest source from https://github.com/kohler/click
> > 
> > cd click
> > ./configure --fix-includes
> > 
> > all seems fine
> > 
> > make
> > --------snip----------
> > In file included from
> >
> /usr/builder/devel/click/include/click-linuxmodule/include1/linux/fs.h:392:0,
> >               
>   from
> /usr/builder/devel/click/linuxmodule/../lib/ino.cc:30:
> >
> /usr/builder/devel/click/include/click-linuxmodule/include1/linux/radix-tree.h:
> > In function ‘void*
> radix_tree_deref_slot(void**)’:
> >
> /usr/builder/devel/click/include/click-linuxmodule/include1/linux/radix-tree.h:150:9:
> > error: ‘void*’ is not a pointer-to-object type
> >
> /usr/builder/devel/click/include/click-linuxmodule/include1/linux/radix-tree.h:150:9:
> > error: invalid type in declaration before ‘=’
> token
> > 
> > 
> > 
> >       
> > 
> > _______________________________________________
> > click mailing list
> > [email protected]
> > https://amsterdam.lcs.mit.edu/mailman/listinfo/click
> 


      

_______________________________________________
click mailing list
[email protected]
https://amsterdam.lcs.mit.edu/mailman/listinfo/click

Reply via email to