Still more #ifdef fun: struct sockaddr_storage

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Still more #ifdef fun: struct sockaddr_storage
Дата
Msg-id 16940.1152980523@sss.pgh.pa.us
обсуждение исходный текст
Список pgsql-hackers
pgcheckdefines reports

src/port/getaddrinfo.c references HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN, defined in src/include/libpq/pqcomm.h

I think this is an actual bug: if we have a platform that calls its
struct sockaddr_storage member __ss_len, and we are using our own
getaddrinfo code, we will fail to initialize the length member of
the returned ai_addr struct.

It would be safe to include src/include/libpq/pqcomm.h into
getaddrinfo.c, but it seems a tad ugly.  Perhaps the machinations
in pqcomm.h to normalize the sockaddr_storage names ought to be
moved into a separate header file?  If so, where to put it?
        regards, tom lane


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

Предыдущее
От: "Florian G. Pflug"
Дата:
Сообщение: RFC: A dead simple implementation of pg_rotate_wal
Следующее
От: "Sergey E. Koposov"
Дата:
Сообщение: PG_RETURN_INT64 vs PointerGetDatum & ANALYZE