diff --git a/libsofia-sip-ua/tport/tport.c b/libsofia-sip-ua/tport/tport.c index f04be360..29323315 100644 --- a/libsofia-sip-ua/tport/tport.c +++ b/libsofia-sip-ua/tport/tport.c @@ -71,11 +71,13 @@ typedef struct tport_nat_s tport_nat_t; #include #include "tport_internal.h" +#if defined (__linux__) #include #if HAVE_NET_IF_H #include #endif #include +#endif #if HAVE_FUNC #elif HAVE_FUNCTION @@ -801,14 +803,15 @@ int tport_bind_socket(int socket, } } #endif - +#if defined(__linux__) if (tport_bind_socket_iface(socket, su, ai) < 0) { return -1; } - +#endif return 0; } +#if defined(__linux__) int tport_bind_socket_iface(int s, su_sockaddr_t *su, su_addrinfo_t *ai) @@ -849,7 +852,7 @@ int tport_bind_socket_iface(int s, /* Technically it's not a "failure" */ return 0; } - +#endif /** Indicate stack that a transport has been updated */ void tport_has_been_updated(tport_t *self) diff --git a/libsofia-sip-ua/tport/tport_internal.h b/libsofia-sip-ua/tport/tport_internal.h index df181f7d..db5f39cf 100644 --- a/libsofia-sip-ua/tport/tport_internal.h +++ b/libsofia-sip-ua/tport/tport_internal.h @@ -440,9 +440,11 @@ void tport_base_timer(tport_t *self, su_time_t now); int tport_bind_socket(int socket, su_addrinfo_t *ai, char const **return_culprit); +#if defined(__linux__) int tport_bind_socket_iface(int s, su_sockaddr_t *su, su_addrinfo_t *ai); +#endif void tport_close(tport_t *self); int tport_shutdown0(tport_t *self, int how);