Re: ss_family in hba.c

Поиск
Список
Период
Сортировка
От Mike Aubury
Тема Re: ss_family in hba.c
Дата
Msg-id 200306172205.06885.mike@aubit.com
обсуждение исходный текст
Ответ на Re: ss_family in hba.c  (Kurt Roeckx <Q@ping.be>)
Список pgsql-hackers
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;  /*
Forcedesired 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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Kurt Roeckx
Дата:
Сообщение: Re: ss_family in hba.c
Следующее
От: David Blasby
Дата:
Сообщение: Re: Extending PostgreSQL in C or C++