Re: [gnet-dev] [PATCH] sockaddr_storage family field



I still don't understand why there's a __ss_family and not a ss_family.
Someone deliberately named the field __ss_family. It may be because it's
still under development or not 100% supported.  All other systems name
the field ss_family.

What version of Linux and libc are you using?  Are you using potato's
kernel package or your own?

Yes, the patch file looks valid.

David

This is what's in my bits/sockaddr.h:

#define __SOCKADDR_COMMON(sa_prefix) \
  sa_family_t sa_prefix##family


And from bits/socket.h:

struct sockaddr_storage
  {
    __SOCKADDR_COMMON (ss_);    /* Address family, etc.  */
    __ss_aligntype __ss_align;  /* Force desired alignment.  */
    char __ss_padding[_SS_PADSIZE];
  };





On Wed, 2003-05-28 at 12:59, jeremy denise free fr wrote:
> Quoting "David A. Helder" <dhelder umich edu>:
> 
> > 
> > I build GNet on Debian Woody with Linux 2.4.  ss_family should be
> > standard.  Could you send me the error messages?
> > 
> > David
> > 
> 
> Of course; after a traditional
> 
>    ./configure --prefix=$HOME
>    make
> 
> some files compile OK, then
> 
> gcc -DHAVE_CONFIG_H -I. -I. -I.. -DG_LOG_DOMAIN=\"GNet\"
> -I/home/denise/include/glib-2.0 -I/home/denise/lib/glib-2.0/include -pthread
> -I/home/denise/include/glib-2.0 -I/home/denise/lib/glib-2.0/include -g -O2
> -D_REENTRANT -DGNET_EXPERIMENTAL -Wall -Wstrict-prototypes -Wmissing-prototypes
> -Wmissing-declarations -c gnet-private.c  -fPIC -DPIC -o .libs/gnet-private.lo
> gnet-private.c: In function `gnet_private_create_listen_socket':
> gnet-private.c:42: structure has no member named `ss_family'
> gnet-private.c:44: structure has no member named `ss_family'
> gnet-private.c:37: warning: `family' might be used uninitialized in this function
> make[2]: *** [gnet-private.lo] Error 1
> make[2]: Leaving directory `/home/denise/src/gnet-2.0.3/src'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/denise/src/gnet-2.0.3'
> make: *** [all-recursive-am] Error 2
> 
> I tried some
> 
>  grep family /usr/include/* /usr/include/*/* /usr/include/*/*/* 2>/dev/null

> but only found that /usr/include/bits/sockaddr.h defined a SOCKADDR_COMMON that
> contains a 'family' field that is used in /usr/include/bits/socket.h .
> 
> BTW, I use gcc-2.95.2 .
> 
> -J-
> 
> PS: what is the correct way to send a patch without having it mangled ? (I
> naively sent it as an attached document with IMP)
-- 
David Helder - dhelder umich edu - http://www.eecs.umich.edu/~dhelder




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