Ticket #50288: leopard-IPV6_TCLASS.patch
File leopard-IPV6_TCLASS.patch, 1.3 KB (added by fhgwright (Fred Wright), 9 years ago) |
---|
-
gpsd.c
old new 149 149 static int sd_socket_count = 0; 150 150 #endif 151 151 152 /* work around the unfinished ipv6 implementation on hurd */ 153 #ifdef __GNU__ 152 /* work around the unfinished ipv6 implementation on hurd and OSX <10.6 */ 154 153 #ifndef IPV6_TCLASS 155 #define IPV6_TCLASS 61 156 #endif 154 # if defined(__GNU__) 155 # define IPV6_TCLASS 61 156 # elif defined(__APPLE__) 157 # define IPV6_TCLASS 36 158 # endif 157 159 #endif 158 160 159 161 static volatile sig_atomic_t signalled; … … 406 408 (void)close(s); 407 409 return -1; 408 410 } 411 #ifdef IPV6_TCLASS 409 412 /* Set packet priority */ 410 413 if (setsockopt(s, IPPROTO_IPV6, IPV6_TCLASS, &dscp, sizeof(dscp)) == -1) 411 414 gpsd_log(&context.errout, LOG_WARN, 412 415 "Warning: SETSOCKOPT TOS failed\n"); 416 #endif /* IPV6_TCLASS */ 413 417 } 414 418 break; 415 419 #endif /* IPV6_ENABLE */ -
netlib.c
old new 21 21 #include "gpsd.h" 22 22 #include "sockaddr.h" 23 23 24 /* work around the unfinished ipv6 implementation on hurd and OSX <10.6 */ 25 #ifndef IPV6_TCLASS 26 # if defined(__GNU__) 27 # define IPV6_TCLASS 61 28 # elif defined(__APPLE__) 29 # define IPV6_TCLASS 36 30 # endif 31 #endif 32 24 33 socket_t netlib_connectsock(int af, const char *host, const char *service, 25 34 const char *protocol) 26 35 {