Re: Re[2]: More on the Couldn't find standard target issue

Sander Smeenk <ssmeenk+ebtables-ntXksADE/[email protected]>
Newsgroups gmane.linux.network.bridge.ebtables.devel
Message-ID <[email protected]>
Quoting Nick Fedchik ([email protected]):

> >> > If you can program in C a little, you can fix this easily.
> >> Hmm.. Why didn't I think of that ;)   I'll go try this now then.
> > It works!  Great!  Thanks alot, again :)
> Well! So where was the source of problem? Just interest...

As Bart said earlier, the GCC i'm using to crosscompile ebtables doesn't
support the __attribute__ ((constructor)) 'gcc magic', this was a bit
new for me too, i'm not /THAT/ good at C yet :) But this meant that the
resulting binary I got from my crosscompiler did not run each
extension's _init function and therefore left all structs uninitialised.

Bart told me about the 'evil hack', and that did the job. I only needed
to rename all functions, remove the __attribute__ ((constructor))
definition, make the function 'void' instead of 'static void', add the
calls to main() in ebtables.c and ofcourse I added function definitions
to include/ebtables_u.h.

Anyone interrested in a patch? :)

Regards,
Sander.

-- 
| If you jog backwards, will you gain weight?
| 1024D/08CEC94D - 34B3 3314 B146 E13C 70C8  9BDB D463 7E41 08CE C94D


-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger 
for complex code. Debugging C/C++ programs can leave you feeling lost and 
disoriented. TotalView can help you find your way. Available on major UNIX 
and Linux platforms. Try it free. www.etnus.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.