SO_LINGER used when not HAVE_STRUCT_LINGER_L_LINGER
Pavel Roskin
proski at gnu.org
Thu May 25 16:50:21 UTC 2006
On Thu, 2006-05-25 at 18:35 +0200, Leonard den Ottolander wrote:
> Hello Pavel,
>
> On Thu, 2006-05-25 at 02:15 -0400, Pavel Roskin wrote:
> > Nothing odd. HAVE_STRUCT_LINGER_L_LINGER means that there is structure
> > linger with field l_linger. That field (and the whole structure) is not
> > used if HAVE_STRUCT_LINGER_L_LINGER is not defined.
>
> So you mean SO_LINGER can be defined although
> HAVE_STRUCT_LINGER_L_LINGER is not?
Yes. Why not? Many other socket options just use an integer as an
option. I can imagine SO_LINGER was an on/off option in the past,
without the timeout.
> > Put #ifdef SO_LINGER ... #endif around the code you quoted. Also do the
> > same for the declaration.
>
> And disable the call to setsockopt() altogether?
Yes. To be pedantic, it would be nice to research whether this option
is needed and why it's only needed for FTP but not for other VFS
implementations.
--
Regards,
Pavel Roskin
More information about the mc-devel
mailing list