mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 10:47:18 +00:00 
			
		
		
		
	Fixes build error for systems not supporting IPV6_TCLASS.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@292155 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
		| @@ -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))) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user