[Pkg-ace-devel] Bug#552899: (const void*) vs (const struct dirent**)

mario mariosimonettisoft65 at alice.it
Tue Mar 16 12:52:15 UTC 2010


I'm Mario Simonetti From Italy (Piombino,Li) , I'm a programmer in 'C'
and I know this language quite good.

I wrote many and many 1000's of rows of source in previously versions of
Linux, as FEDORA FC2, FC4, FC7 , Debian 4.05 , Ubuntu 9.04 , but
I never had this kind of problem.

the template: int (*)(const void*,const void*) works very well in all of
those distributions.

But when I try to compile the same source files with Ubuntu 9.10 , I
have always the problem.

It doesn't matter if you are compiling a device-driver , or a patch o
something else , the problem existes and it isn't still solved.

I think that the casting of all our variables to adjust the correct new
syntax is not a good idea because '*' and '**' means two different
things.

(const void*) is a simple pointer to something , but (const struct
dirent **) is a pointer of a pointer, so if yow only pass the arguments
to the scandir() function and yow don't do anything other , all is okay.

If your code does something before passing the arguments to scandir
it processes variables in tho different ways (Big Problem).
Yow just get a Segmentation-fault of course !!!!!

Yow must review enterely the portion of your code keeping in your mind
what yow want to do.

Goodbye at all of yow







More information about the Pkg-ace-devel mailing list