Ticket #43256: patch-tftpd-recvfrom.c.diff
File patch-tftpd-recvfrom.c.diff, 1.2 KB (added by jul_bsd@…, 11 years ago) |
---|
-
tftpd/recvfrom.c
old new 17 17 * 18 18 */ 19 19 20 #if defined(__APPLE__) 21 #if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1070 22 #define __APPLE_USE_RFC_3542 1 23 #endif 24 #endif 25 20 26 #include "config.h" /* Must be included first! */ 21 27 #include "common/tftpsubs.h" 22 28 #include "recvfrom.h" … … 220 226 sizeof(struct in6_addr)); 221 227 #endif 222 228 223 #ifdef HAVE_STRUCT_IN6_PKTINFO224 229 if (cmptr->cmsg_level == IPPROTO_IPV6 && 230 #if defined(HAVE_STRUCT_IN6_PKTINFO) && defined(IPV6_RECVPKTINFO) /* Some older Darwin platforms require the latter */ 225 231 (cmptr->cmsg_type == IPV6_RECVPKTINFO || 226 cmptr->cmsg_type == IPV6_PKTINFO)) { 232 #else 233 ( 234 #endif 235 cmptr->cmsg_type == IPV6_PKTINFO)) { 227 236 memcpy(&pktinfo6, CMSG_DATA(cmptr), 228 237 sizeof(struct in6_pktinfo)); 229 238 memcpy(&myaddr->s6.sin6_addr, &pktinfo6.ipi6_addr, 230 239 sizeof(struct in6_addr)); 231 240 } 232 #endif233 241 } 234 242 #endif 235 243 }