[gnet-dev] [PATCH] sockaddr_storage family field



Hello

I found  a portability  issue regarding the  'family' field  of struct
sockaddr_storage.   On my Debian  (Potato) machine,  it is  defined as
'__ss_family', not 'ss.family'. I  don't know whether it's specific to
this version or not.

Anyway, I propose the following patch which

 - adds a (very simple) test to  'configure' to figure out the name of
this  field (by  checking, if  'sockaddr_storage' already  exists, for
'ss_family' then '__ss_family')

 - and then defines 'GNET_SOCKADDR_FAMILY_FIELD_NAME' accordingly, for
later use in 'gnet-private.h' .

This  patch was tested  against gnet-2.0.3,  but a  quick look  at CVS
version makes me think it should be applicable to the later as well.

-J-

Attachment: gnet.patch
Description: Binary data



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