socket length arg fix (SAMBA_2_0 branch)

Andrej Borsenkow borsenkow.msk at
Tue Dec 15 10:17:45 GMT 1998

> > The problem, even with your patch, is that there is no
> > portable way to discover what prototype a particular
> > system is using for the last argument to accept() etc.
> actually, I think there is.
> You could have configure code that includes the right headers then
> declares its own prototype for the function. If the code compiles then
> it means that either the OS headers don't prototype that function or
> the prototype used matches the OS prototype (this relies on the fact
> that most compilers give an error and not just a warning if you have
> conflicting prototypes).
> so on systems where the OS headers do have a prototype we should be
> able to tell. On other systems we just have to go with what we have
> now.
> Anyone want to implement this?

That was exactly what I suggested (and what some other packages do).
Unfortunately, somebody (I think, Tim Rice) reported, that his compiler
gives warning but compiles the code. So it is not reliable as well.


More information about the samba-technical mailing list