diff options
author | Benny Prijono <bennylp@teluu.com> | 2008-01-08 16:02:33 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2008-01-08 16:02:33 +0000 |
commit | f3c4587594a41692ed43d248fcd63f57f3da4ffa (patch) | |
tree | 3d93b62e3f4599016c6e3232b3c56d65664a0df0 /pjlib/src/pj/ip_helper_generic.c | |
parent | 7c7d7c0550a3d340f294595fff9597c5c2a65bc9 (diff) |
Fixed compilation error about IFF_UP
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1668 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/src/pj/ip_helper_generic.c')
-rw-r--r-- | pjlib/src/pj/ip_helper_generic.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pjlib/src/pj/ip_helper_generic.c b/pjlib/src/pj/ip_helper_generic.c index 7d4c6fc9..c9ece26d 100644 --- a/pjlib/src/pj/ip_helper_generic.c +++ b/pjlib/src/pj/ip_helper_generic.c @@ -52,7 +52,8 @@ #if 0 /* dummy */ -#elif defined(PJ_HAS_IFADDRS_H) && PJ_HAS_IFADDRS_H != 0 +#elif defined(PJ_HAS_IFADDRS_H) && PJ_HAS_IFADDRS_H != 0 && \ + defined(PJ_HAS_NET_IF_H) && PJ_HAS_NET_IF_H != 0 /* Using getifaddrs() is preferred since it can work with both IPv4 and IPv6 */ static pj_status_t if_enum_by_af(int af, unsigned *p_cnt, @@ -108,7 +109,9 @@ static pj_status_t if_enum_by_af(int af, return (*p_cnt != 0) ? PJ_SUCCESS : PJ_ENOTFOUND; } -#elif defined(SIOCGIFCONF) +#elif defined(SIOCGIFCONF) && \ + defined(PJ_HAS_NET_IF_H) && PJ_HAS_NET_IF_H != 0 + /* Note: this does not work with IPv6 */ static pj_status_t if_enum_by_af(int af, unsigned *p_cnt, |