diff options
author | Ondrej Filip <feela@majklik.network.cz> | 2010-04-27 11:28:44 +0200 |
---|---|---|
committer | Ondrej Filip <feela@majklik.network.cz> | 2010-04-27 11:28:44 +0200 |
commit | 96599c957baa9c82bde91d610ce4f519aead05e9 (patch) | |
tree | 28fc5b3e90afb11e288a6c428d1203dd7992bd35 /sysdep/unix | |
parent | ba130172549ef2313f713e048083432f74e7d03d (diff) | |
parent | 9d1ee1388771a3caa6c23163571a80457adfab2c (diff) | |
download | bird-96599c957baa9c82bde91d610ce4f519aead05e9.tar bird-96599c957baa9c82bde91d610ce4f519aead05e9.zip |
Merge branch 'master' of ssh://git.nic.cz/projects/bird/GIT/bird
Diffstat (limited to 'sysdep/unix')
-rw-r--r-- | sysdep/unix/io.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c index d1fad1f..dc7146f 100644 --- a/sysdep/unix/io.c +++ b/sysdep/unix/io.c @@ -7,6 +7,10 @@ * Can be freely distributed and used under the terms of the GNU GPL. */ +/* Unfortunately, some glibc versions hide parts of RFC 3542 API + if _GNU_SOURCE is not defined. */ +#define _GNU_SOURCE 1 + #include <stdio.h> #include <stdlib.h> #include <time.h> @@ -668,6 +672,16 @@ get_sockaddr(struct sockaddr_in *sa, ip_addr *a, unsigned *port, int check) #define CMSG_RX_SPACE CMSG_SPACE(sizeof(struct in6_pktinfo)) #define CMSG_TX_SPACE CMSG_SPACE(sizeof(struct in6_pktinfo)) +/* + * RFC 2292 uses IPV6_PKTINFO for both the socket option and the cmsg + * type, RFC 3542 changed the socket option to IPV6_RECVPKTINFO. If we + * don't have IPV6_RECVPKTINFO we suppose the OS implements the older + * RFC and we use IPV6_PKTINFO. + */ +#ifndef IPV6_RECVPKTINFO +#define IPV6_RECVPKTINFO IPV6_PKTINFO +#endif + static char * sysio_register_cmsgs(sock *s) { |