Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
videolan
vlc-gpu
Commits
9b21d97a
Commit
9b21d97a
authored
Aug 13, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix compilation against WinXP (conflicting symbols)
parent
975c118a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
12 deletions
+15
-12
src/network/getaddrinfo.c
src/network/getaddrinfo.c
+15
-12
No files found.
src/network/getaddrinfo.c
View file @
9b21d97a
...
@@ -119,11 +119,11 @@ const char *vlc_gai_strerror (int errnum)
...
@@ -119,11 +119,11 @@ const char *vlc_gai_strerror (int errnum)
*/
*/
#ifdef WIN32
#ifdef WIN32
static
int
WSAAPI
static
int
WSAAPI
getnameinfo
(
const
struct
sockaddr
*
sa
,
socklen_t
salen
,
stub_
getnameinfo
(
const
struct
sockaddr
*
sa
,
socklen_t
salen
,
char
*
host
,
DWORD
hostlen
,
char
*
serv
,
DWORD
servlen
,
int
flags
)
char
*
host
,
DWORD
hostlen
,
char
*
serv
,
DWORD
servlen
,
int
flags
)
#else
#else
static
int
static
int
getnameinfo
(
const
struct
sockaddr
*
sa
,
socklen_t
salen
,
stub_
getnameinfo
(
const
struct
sockaddr
*
sa
,
socklen_t
salen
,
char
*
host
,
int
hostlen
,
char
*
serv
,
int
servlen
,
int
flags
)
char
*
host
,
int
hostlen
,
char
*
serv
,
int
servlen
,
int
flags
)
#endif
#endif
{
{
...
@@ -165,7 +165,8 @@ getnameinfo (const struct sockaddr *sa, socklen_t salen,
...
@@ -165,7 +165,8 @@ getnameinfo (const struct sockaddr *sa, socklen_t salen,
}
}
return
0
;
return
0
;
}
}
#undef getnameinfo
#define getnameifo stub_getnameinfo
#endif
/* if !HAVE_GETNAMEINFO */
#endif
/* if !HAVE_GETNAMEINFO */
#ifndef HAVE_GETADDRINFO
#ifndef HAVE_GETADDRINFO
...
@@ -201,9 +202,9 @@ gai_error_from_herrno (void)
...
@@ -201,9 +202,9 @@ gai_error_from_herrno (void)
* This functions must be used to free the memory allocated by getaddrinfo().
* This functions must be used to free the memory allocated by getaddrinfo().
*/
*/
#ifdef WIN32
#ifdef WIN32
static
void
WSAAPI
freeaddrinfo
(
struct
addrinfo
*
res
)
static
void
WSAAPI
stub_
freeaddrinfo
(
struct
addrinfo
*
res
)
#else
#else
static
void
freeaddrinfo
(
struct
addrinfo
*
res
)
static
void
stub_
freeaddrinfo
(
struct
addrinfo
*
res
)
#endif
#endif
{
{
if
(
res
==
NULL
)
if
(
res
==
NULL
)
...
@@ -286,11 +287,11 @@ makeipv4info (int type, int proto, u_long ip, u_short port, const char *name)
...
@@ -286,11 +287,11 @@ makeipv4info (int type, int proto, u_long ip, u_short port, const char *name)
*/
*/
#ifdef WIN32
#ifdef WIN32
static
int
WSAAPI
static
int
WSAAPI
getaddrinfo
(
const
char
*
node
,
const
char
*
service
,
stub_
getaddrinfo
(
const
char
*
node
,
const
char
*
service
,
const
struct
addrinfo
*
hints
,
struct
addrinfo
**
res
)
const
struct
addrinfo
*
hints
,
struct
addrinfo
**
res
)
#else
#else
static
int
static
int
getaddrinfo
(
const
char
*
node
,
const
char
*
service
,
stub_
getaddrinfo
(
const
char
*
node
,
const
char
*
service
,
const
struct
addrinfo
*
hints
,
struct
addrinfo
**
res
)
const
struct
addrinfo
*
hints
,
struct
addrinfo
**
res
)
#endif
#endif
{
{
...
@@ -437,6 +438,10 @@ getaddrinfo (const char *node, const char *service,
...
@@ -437,6 +438,10 @@ getaddrinfo (const char *node, const char *service,
return
0
;
return
0
;
}
}
#undef getaddrinfo
#define getaddrifo stub_getaddrinfo
#undef freeaddrinfo
#define freeaddrifo stub_freeaddrinfo
#endif
/* if !HAVE_GETADDRINFO */
#endif
/* if !HAVE_GETADDRINFO */
#if defined( WIN32 ) && !defined( UNDER_CE )
#if defined( WIN32 ) && !defined( UNDER_CE )
...
@@ -490,8 +495,7 @@ static WSAAPI int _ws2_getnameinfo_bind( const struct sockaddr FAR * sa, socklen
...
@@ -490,8 +495,7 @@ static WSAAPI int _ws2_getnameinfo_bind( const struct sockaddr FAR * sa, socklen
if
(
entry
==
NULL
)
if
(
entry
==
NULL
)
{
{
/* not found, use replacement API instead */
/* not found, use replacement API instead */
entry
=
getnameinfo
;
entry
=
stub_getnameinfo
;
}
}
/* call API before replacing function pointer to avoid crash */
/* call API before replacing function pointer to avoid crash */
result
=
entry
(
sa
,
salen
,
host
,
hostlen
,
serv
,
servlen
,
flags
);
result
=
entry
(
sa
,
salen
,
host
,
hostlen
,
serv
,
servlen
,
flags
);
...
@@ -514,8 +518,8 @@ static WSAAPI int _ws2_getaddrinfo_bind(const char FAR *node, const char FAR *se
...
@@ -514,8 +518,8 @@ static WSAAPI int _ws2_getaddrinfo_bind(const char FAR *node, const char FAR *se
if
((
entry
==
NULL
)
||
(
freentry
==
NULL
))
if
((
entry
==
NULL
)
||
(
freentry
==
NULL
))
{
{
/* not found, use replacement API instead */
/* not found, use replacement API instead */
entry
=
getaddrinfo
;
entry
=
stub_
getaddrinfo
;
freentry
=
freeaddrinfo
;
freentry
=
stub_
freeaddrinfo
;
}
}
/* call API before replacing function pointer to avoid crash */
/* call API before replacing function pointer to avoid crash */
result
=
entry
(
node
,
service
,
hints
,
res
);
result
=
entry
(
node
,
service
,
hints
,
res
);
...
@@ -531,7 +535,6 @@ static WSAAPI int _ws2_getaddrinfo_bind(const char FAR *node, const char FAR *se
...
@@ -531,7 +535,6 @@ static WSAAPI int _ws2_getaddrinfo_bind(const char FAR *node, const char FAR *se
#endif
#endif
int
vlc_getnameinfo
(
const
struct
sockaddr
*
sa
,
int
salen
,
int
vlc_getnameinfo
(
const
struct
sockaddr
*
sa
,
int
salen
,
char
*
host
,
int
hostlen
,
int
*
portnum
,
int
flags
)
char
*
host
,
int
hostlen
,
int
*
portnum
,
int
flags
)
{
{
...
...
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