Skip to content

Commit

Permalink
Default to recvfrom if we dont have IPv6_RECVPKTINFO
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed Oct 25, 2013
1 parent 0a9cc3d commit 203b1e0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/lib/udpfromto.c
Expand Up @@ -78,7 +78,12 @@ RCSID("$Id$")
*/
#ifdef IPV6_PKTINFO
# ifdef __linux__
# define FR_IPV6_RECVPKTINFO IPV6_RECVPKTINFO
# ifdef IPV6_RECVPKTINFO
# define FR_IPV6_RECVPKTINFO IPV6_RECVPKTINFO
/* Fallback to to using recvfrom */
# else
# undef IPV6_RECVPKTINFO
# endif
# else
# define FR_IPV6_RECVPKTINFO IPV6_PKTINFO
# endif
Expand Down Expand Up @@ -157,7 +162,7 @@ int recvfromto(int s, void *buf, size_t len, int flags,
struct sockaddr_storage si;
socklen_t si_len = sizeof(si);

#if !defined(IP_PKTINFO) && !defined(IP_RECVDSTADDR) && !defined (IPV6_PKTINFO)
#if !defined(IP_PKTINFO) && !defined(IP_RECVDSTADDR) && !defined(IPV6_PKTINFO)
/*
* If the recvmsg() flags aren't defined, fall back to
* using recvfrom().
Expand Down

0 comments on commit 203b1e0

Please sign in to comment.