aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authordvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2010-10-18 19:16:00 +0000
committerdvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2010-10-18 19:16:00 +0000
commit4807c7d193ebbadfef2624846462f5ead00a31a1 (patch)
tree77435b2d04bbec53940ffa0932de2367a9ac2e2a /main
parent1d7b4e4ade8aed8b6dc3a955920fcf500250f771 (diff)
Fixes build error for systems not supporting IPV6_TCLASS.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@292155 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/netsock2.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/main/netsock2.c b/main/netsock2.c
index d4a0f9873..80dc355ee 100644
--- a/main/netsock2.c
+++ b/main/netsock2.c
@@ -453,7 +453,7 @@ ssize_t ast_sendto(int sockfd, const void *buf, size_t len, int flags,
int ast_set_qos(int sockfd, int tos, int cos, const char *desc)
{
- int res;
+ int res = 0;
int set_tos;
int set_tclass;
struct ast_sockaddr addr;
@@ -473,6 +473,7 @@ int ast_set_qos(int sockfd, int tos, int cos, const char *desc)
}
}
+#if defined(IPV6_TCLASS) && defined(IPPROTO_IPV6)
if (set_tclass) {
if (!ast_getsockname(sockfd, &addr) && ast_sockaddr_is_ipv6(&addr)) {
if ((res = setsockopt(sockfd, IPPROTO_IPV6, IPV6_TCLASS, &tos, sizeof(tos)))) {
@@ -483,6 +484,7 @@ int ast_set_qos(int sockfd, int tos, int cos, const char *desc)
}
}
}
+#endif
#ifdef linux
if (setsockopt(sockfd, SOL_SOCKET, SO_PRIORITY, &cos, sizeof(cos))) {