SO_LINGER used when not HAVE_STRUCT_LINGER_L_LINGER



Hi,

Building mc on Minix-3.1.2 last weekend I stumbled over this piece of
code:

vfs/ftpfs.c:1346
#ifdef HAVE_STRUCT_LINGER_L_LINGER
    li.l_onoff = 1;
    li.l_linger = 120;
    setsockopt (sock, SOL_SOCKET, SO_LINGER, (char *) &li, sizeof (li));
#else
    setsockopt (sock, SOL_SOCKET, SO_LINGER, &flag_one, sizeof
(flag_one));
#endif

The build on Minix chokes on the fact that SO_LINGER is undefined. It
seems a bit odd that constant is being used when
HAVE_STRUCT_LINGER_L_LINGER is not defined. Any ideas on how to fix this
cleanly?

Leonard.

-- 
mount -t life -o ro /dev/dna /genetic/research





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]