Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
b1e0bde5
Commit
b1e0bde5
authored
Mar 27, 2009
by
Sean McNamara
Committed by
Max Kellermann
Mar 27, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Uniform getaddrinfo() on WIN32 or POSIX, because MinGW now supports it
parent
9c63ffa5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
23 deletions
+0
-23
listen.c
src/listen.c
+0
-23
No files found.
src/listen.c
View file @
b1e0bde5
...
@@ -213,7 +213,6 @@ static bool
...
@@ -213,7 +213,6 @@ static bool
listen_add_host
(
const
char
*
hostname
,
unsigned
port
,
GError
**
error
)
listen_add_host
(
const
char
*
hostname
,
unsigned
port
,
GError
**
error
)
{
{
#ifdef HAVE_TCP
#ifdef HAVE_TCP
#ifndef WIN32
struct
addrinfo
hints
,
*
ai
,
*
i
;
struct
addrinfo
hints
,
*
ai
,
*
i
;
char
service
[
20
];
char
service
[
20
];
int
ret
;
int
ret
;
...
@@ -250,28 +249,6 @@ listen_add_host(const char *hostname, unsigned port, GError **error)
...
@@ -250,28 +249,6 @@ listen_add_host(const char *hostname, unsigned port, GError **error)
freeaddrinfo
(
ai
);
freeaddrinfo
(
ai
);
return
true
;
return
true
;
#else
/* WIN32 */
const
struct
hostent
*
he
;
g_debug
(
"binding to address for %s"
,
hostname
);
he
=
gethostbyname
(
hostname
);
if
(
he
==
NULL
)
{
g_set_error
(
error
,
listen_quark
(),
0
,
"Failed to look up host
\"
%s
\"
"
,
hostname
);
return
false
;
}
if
(
he
->
h_addrtype
!=
AF_INET
)
{
g_set_error
(
error
,
listen_quark
(),
0
,
"IPv4 address expected for host
\"
%s
\"
"
,
hostname
);
return
false
;
}
return
listen_add_address
(
AF_INET
,
he
->
h_addr
,
he
->
h_length
,
error
);
#endif
/* !WIN32 */
#else
/* HAVE_TCP */
#else
/* HAVE_TCP */
(
void
)
hostname
;
(
void
)
hostname
;
...
...
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