diff options
-rw-r--r-- | pjlib/src/pj/addr_resolv_sock.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/pjlib/src/pj/addr_resolv_sock.c b/pjlib/src/pj/addr_resolv_sock.c index 127d49ea..03735e9b 100644 --- a/pjlib/src/pj/addr_resolv_sock.c +++ b/pjlib/src/pj/addr_resolv_sock.c @@ -82,6 +82,8 @@ PJ_DEF(pj_status_t) pj_getaddrinfo(int af, const pj_str_t *nodename, PJ_ASSERT_RETURN(af==PJ_AF_INET || af==PJ_AF_INET6 || af==PJ_AF_UNSPEC, PJ_EINVAL); +#if PJ_WIN32_WINCE + /* Check if nodename is IP address */ pj_bzero(&ai[0], sizeof(ai[0])); if ((af==PJ_AF_INET || af==PJ_AF_UNSPEC) && @@ -109,6 +111,10 @@ PJ_DEF(pj_status_t) pj_getaddrinfo(int af, const pj_str_t *nodename, return PJ_SUCCESS; } +#else /* PJ_WIN32_WINCE */ + PJ_UNUSED_ARG(has_addr); +#endif + /* Copy node name to null terminated string. */ if (nodename->slen >= PJ_MAX_HOSTNAME) return PJ_ENAMETOOLONG; @@ -213,6 +219,8 @@ PJ_DEF(pj_status_t) pj_getaddrinfo(int af, const pj_str_t *nodename, PJ_ASSERT_RETURN(count && *count, PJ_EINVAL); +#if PJ_WIN32_WINCE + /* Check if nodename is IP address */ pj_bzero(&ai[0], sizeof(ai[0])); if ((af==PJ_AF_INET || af==PJ_AF_UNSPEC) && @@ -241,6 +249,10 @@ PJ_DEF(pj_status_t) pj_getaddrinfo(int af, const pj_str_t *nodename, return PJ_SUCCESS; } +#else /* PJ_WIN32_WINCE */ + PJ_UNUSED_ARG(has_addr); +#endif + if (af == PJ_AF_INET || af == PJ_AF_UNSPEC) { pj_hostent he; unsigned i, max_count; |