diff --git a/src/backend/libpq/hba.c b/src/backend/libpq/hba.c index 49a45941701..1ba3915866e 100644 --- a/src/backend/libpq/hba.c +++ b/src/backend/libpq/hba.c @@ -822,7 +822,7 @@ parse_hba_line(List *line, int line_num, HbaLine *parsedline) /* Get the IP address either way */ hints.ai_flags = AI_NUMERICHOST; - hints.ai_family = PF_UNSPEC; + hints.ai_family = AF_UNSPEC; hints.ai_socktype = 0; hints.ai_protocol = 0; hints.ai_addrlen = 0; diff --git a/src/backend/postmaster/pgstat.c b/src/backend/postmaster/pgstat.c index 536bcff6af2..39886b0a3c5 100644 --- a/src/backend/postmaster/pgstat.c +++ b/src/backend/postmaster/pgstat.c @@ -314,7 +314,7 @@ pgstat_init(void) * Create the UDP socket for sending and receiving statistic messages */ hints.ai_flags = AI_PASSIVE; - hints.ai_family = PF_UNSPEC; + hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_DGRAM; hints.ai_protocol = 0; hints.ai_addrlen = 0; diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c index 9442444d963..855b81e24c3 100644 --- a/src/bin/initdb/initdb.c +++ b/src/bin/initdb/initdb.c @@ -1199,7 +1199,7 @@ setup_config(void) /* for best results, this code should match parse_hba() */ hints.ai_flags = AI_NUMERICHOST; - hints.ai_family = PF_UNSPEC; + hints.ai_family = AF_UNSPEC; hints.ai_socktype = 0; hints.ai_protocol = 0; hints.ai_addrlen = 0; diff --git a/src/port/pipe.c b/src/port/pipe.c index 4d04ba9da44..ae9fa5b4d66 100644 --- a/src/port/pipe.c +++ b/src/port/pipe.c @@ -55,7 +55,7 @@ pgpipe(int handles[2]) closesocket(s); return -1; } - if ((handles[1] = socket(PF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET) + if ((handles[1] = socket(AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET) { ereport(LOG, (errmsg_internal("pgpipe failed to create socket 2: %ui", WSAGetLastError()))); closesocket(s);