Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
b748d47b
Commit
b748d47b
authored
May 24, 2005
by
Steve Lhomme
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
getaddrinfo.c: fix MSVC compilation
parent
4ed95dfa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
25 deletions
+35
-25
src/misc/getaddrinfo.c
src/misc/getaddrinfo.c
+35
-25
No files found.
src/misc/getaddrinfo.c
View file @
b748d47b
...
...
@@ -23,7 +23,6 @@
*****************************************************************************/
#include <vlc/vlc.h>
#include "network.h"
#include <stddef.h>
/* size_t */
#include <string.h>
/* strncpy(), strlen(), memcpy(), memset(), strchr() */
...
...
@@ -37,15 +36,24 @@
#endif
#include <errno.h>
#if defined (UNDER_CE)
# include <winsock.h>
#elif defined WIN32
# include <winsock2.h>
# include <ws2tcpip.h>
#if defined( WIN32 ) || defined( UNDER_CE )
# include <winsock2.h>
# include <ws2tcpip.h>
#else
# include <netdb.h>
# include <sys/socket.h>
# include <netinet/in.h>
# ifdef HAVE_ARPA_INET_H
# include <arpa/inet.h>
# endif
# include <netdb.h>
#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#include "network.h"
#ifdef SYS_BEOS
#define NO_ADDRESS NO_DATA
#define PF_INET AF_INET
...
...
@@ -597,28 +605,30 @@ int vlc_getaddrinfo( vlc_object_t *p_this, const char *node,
service
=
"0"
;
#ifdef WIN32
typedef
int
(
CALLBACK
*
GETADDRINFO
)
(
const
char
*
,
const
char
*
,
const
struct
addrinfo
*
,
struct
addrinfo
**
);
HINSTANCE
wship6_module
;
GETADDRINFO
ws2_getaddrinfo
;
wship6_module
=
LoadLibrary
(
"wship6.dll"
);
if
(
wship6_module
!=
NULL
)
{
ws2_getaddrinfo
=
(
GETADDRINFO
)
GetProcAddress
(
wship6_module
,
"getaddrinfo"
);
if
(
ws2_getaddrinfo
!=
NULL
)
typedef
int
(
CALLBACK
*
GETADDRINFO
)
(
const
char
*
,
const
char
*
,
const
struct
addrinfo
*
,
struct
addrinfo
**
);
HINSTANCE
wship6_module
;
GETADDRINFO
ws2_getaddrinfo
;
wship6_module
=
LoadLibrary
(
"wship6.dll"
);
if
(
wship6_module
!=
NULL
)
{
int
i_ret
;
ws2_getaddrinfo
=
(
GETADDRINFO
)
GetProcAddress
(
wship6_module
,
"getaddrinfo"
);
i_ret
=
ws2_getaddrinfo
(
psz_node
,
service
,
&
hints
,
res
);
FreeLibrary
(
wship6_module
);
/* is this wise ? */
return
i_ret
;
}
if
(
ws2_getaddrinfo
!=
NULL
)
{
int
i_ret
;
FreeLibrary
(
wship6_module
);
i_ret
=
ws2_getaddrinfo
(
psz_node
,
service
,
&
hints
,
res
);
FreeLibrary
(
wship6_module
);
/* is this wise ? */
return
i_ret
;
}
FreeLibrary
(
wship6_module
);
}
}
#endif
#if HAVE_GETADDRINFO
...
...
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