Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
9e56c5a4
Commit
9e56c5a4
authored
Aug 27, 2005
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Windows needs WSAStartup() before getaddrinfo() will work. Andrew Dunstan
parent
5a7d3697
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
src/bin/initdb/initdb.c
src/bin/initdb/initdb.c
+10
-2
No files found.
src/bin/initdb/initdb.c
View file @
9e56c5a4
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
* Portions Copyright (c) 1994, Regents of the University of California
* Portions taken from FreeBSD.
* Portions taken from FreeBSD.
*
*
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.9
6 2005/08/25 02:22:59
tgl Exp $
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.9
7 2005/08/27 18:44:03
tgl Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -1221,6 +1221,13 @@ setup_config(void)
...
@@ -1221,6 +1221,13 @@ setup_config(void)
{
{
struct
addrinfo
*
gai_result
;
struct
addrinfo
*
gai_result
;
struct
addrinfo
hints
;
struct
addrinfo
hints
;
int
err
=
0
;
#ifdef WIN32
/* need to call WSAStartup before calling getaddrinfo */
WSADATA
wsaData
;
err
=
WSAStartup
(
MAKEWORD
(
2
,
2
),
&
wsaData
);
#endif
/* for best results, this code should match parse_hba() */
/* for best results, this code should match parse_hba() */
hints
.
ai_flags
=
AI_NUMERICHOST
;
hints
.
ai_flags
=
AI_NUMERICHOST
;
...
@@ -1232,7 +1239,8 @@ setup_config(void)
...
@@ -1232,7 +1239,8 @@ setup_config(void)
hints
.
ai_addr
=
NULL
;
hints
.
ai_addr
=
NULL
;
hints
.
ai_next
=
NULL
;
hints
.
ai_next
=
NULL
;
if
(
getaddrinfo
(
"::1"
,
NULL
,
&
hints
,
&
gai_result
)
!=
0
)
if
(
err
!=
0
||
getaddrinfo
(
"::1"
,
NULL
,
&
hints
,
&
gai_result
)
!=
0
)
conflines
=
replace_token
(
conflines
,
conflines
=
replace_token
(
conflines
,
"host all all ::1"
,
"host all all ::1"
,
"#host all all ::1"
);
"#host all all ::1"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment