Ticket #43256: patch-tftpd-recvfrom.c.diff

File patch-tftpd-recvfrom.c.diff, 1.2 KB (added by jul_bsd@…, 10 years ago)
  • tftpd/recvfrom.c

    old new  
    1717 *
    1818 */
    1919
     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
    2026#include "config.h"             /* Must be included first! */
    2127#include "common/tftpsubs.h"
    2228#include "recvfrom.h"
     
    220226                           sizeof(struct in6_addr));
    221227#endif
    222228
    223 #ifdef HAVE_STRUCT_IN6_PKTINFO
    224229                if (cmptr->cmsg_level == IPPROTO_IPV6 &&
     230#if defined(HAVE_STRUCT_IN6_PKTINFO) && defined(IPV6_RECVPKTINFO) /* Some older Darwin platforms require the latter */
    225231                    (cmptr->cmsg_type == IPV6_RECVPKTINFO ||
    226                      cmptr->cmsg_type == IPV6_PKTINFO)) {
     232#else
     233                    (
     234#endif
     235                    cmptr->cmsg_type == IPV6_PKTINFO)) {
    227236                    memcpy(&pktinfo6, CMSG_DATA(cmptr),
    228237                           sizeof(struct in6_pktinfo));
    229238                    memcpy(&myaddr->s6.sin6_addr, &pktinfo6.ipi6_addr,
    230239                           sizeof(struct in6_addr));
    231240                }
    232 #endif
    233241            }
    234242#endif
    235243        }