Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
belle-sip
Commits
a0ee7149
Commit
a0ee7149
authored
Aug 22, 2013
by
Ghislain MARY
Browse files
Use fixed nameservers when cross-compiling for Windows.
parent
4e8baaaf
Changes
2
Hide whitespace changes
Inline
Side-by-side
configure.ac
View file @
a0ee7149
...
...
@@ -27,7 +27,9 @@ LT_INIT(win32-dll)
dnl Workaround for mingw, whose compiler doesn't check in /usr/include ...
case "$target_os" in
*mingw*)
if test "$cross_compiling" != "yes"; then
if test "$cross_compiling" = "yes"; then
CPPFLAGS="$CPPFLAGS -DUSE_FIXED_NAMESERVERS"
else
if test "$prefix" = "/usr" ; then
CPPFLAGS="$CPPFLAGS -I/usr/include"
LDFLAGS="$LDFLAGS -L/usr/lib"
...
...
src/dns.c
View file @
a0ee7149
...
...
@@ -72,7 +72,14 @@
#endif
#include <winsock2.h>
#include <ws2tcpip.h>
#ifndef WINAPI_FAMILY_PHONE_APP
#ifndef USE_FIXED_NAMESERVERS
#if WINAPI_FAMILY_PHONE_APP
#define USE_FIXED_NAMESERVERS 1
#else
#define USE_FIXED_NAMESERVERS 0
#endif
#endif
#if !USE_FIXED_NAMESERVERS
#include <IPHlpApi.h>
#pragma comment(lib, "IPHLPAPI.lib")
#endif
...
...
@@ -840,7 +847,7 @@ static int dns_poll(int fd, short events, int timeout) {
fd_set
rset
,
wset
;
struct
timeval
tv
=
{
timeout
,
0
};
#if
WINAPI_FAMILY_PHONE_APP
#if
USE_FIXED_NAMESERVERS
return
0
;
#endif
...
...
@@ -4182,7 +4189,7 @@ int dns_resconf_loadpath(struct dns_resolv_conf *resconf, const char *path) {
#ifdef _WIN32
int
dns_resconf_loadwin
(
struct
dns_resolv_conf
*
resconf
)
{
#if
def WINAPI_FAMILY_PHONE_APP
#if
USE_FIXED_NAMESERVERS
const
char
*
const
nameservers
[]
=
{
"8.8.8.8"
,
"8.8.4.4"
...
...
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