Re: ss_family in hba.c

From: Mike Aubury <mike(at)aubit(dot)com>
To: Kurt Roeckx <Q(at)ping(dot)be>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: ss_family in hba.c
Date: 2003-06-17 21:05:06
Message-ID: 200306172205.06885.mike@aubit.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-cygwin pgsql-general pgsql-hackers pgsql-patches

My system has the same problem - struct sockaddr_storage is defined in
/usr/include/bits/socket.h :

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

Where SOCKADDR_COMMON is defined in sockaddr.h as :

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

That means on my machine it needs __ss_family and not ss_family

Kernel 2.4.18
SuSE 7.1

I changed ss_family to __ss_family and it compiles fine (also in an ip.c &
fe-connect.c IIRC) ...

On Tuesday 17 June 2003 9:49 pm, Kurt Roeckx wrote:
> On Tue, Jun 17, 2003 at 03:32:32PM -0500, Bruno Wolff III wrote:
> > I was looking at this some more and now think there is something wrong
> > with the references to ss_family rather than a missing inlcude file.
> > Perhaps those were supposed to be references to sa_family or there
> > is a missing field from the socket_storage type definition.
>
> The struct sockaddr_storage should only have 1 field you can use
> and that is ss_family. The other fields are there just to get
> the right size and padding.
>
> Does your system have it's own (broken?) struct sockaddr_storage
> maybe?
>
>
> Kurt
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster

In response to

Browse pgsql-cygwin by date

  From Date Subject
Next Message deststar 2003-06-18 00:09:58 Re: [HACKERS] sa_family_t in cygwin compile of cvs
Previous Message Kurt Roeckx 2003-06-17 20:49:00 Re: ss_family in hba.c

Browse pgsql-general by date

  From Date Subject
Next Message Felipe Schnack 2003-06-17 21:10:06 deadlocks
Previous Message Jim C. Nasby 2003-06-17 21:05:01 Re: full featured alter table?

Browse pgsql-hackers by date

  From Date Subject
Next Message David Blasby 2003-06-17 21:13:19 Re: Extending PostgreSQL in C or C++
Previous Message Kurt Roeckx 2003-06-17 20:49:00 Re: ss_family in hba.c

Browse pgsql-patches by date

  From Date Subject
Next Message Peter Eisentraut 2003-06-17 22:31:50 Re: [HACKERS] CVS -Tip compile issue -- FreeBSD 4.8
Previous Message Kurt Roeckx 2003-06-17 20:49:00 Re: ss_family in hba.c