From ea33b8d061479eca72b5511f4887ccfd4bc57799 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 2 Feb 2009 16:48:22 +0000 Subject: [PATCH] merge radvd fix from r14349 SVN-Revision: 14360 --- ipv6/radvd/Makefile | 2 +- ipv6/radvd/patches/003-linux_old_compat.patch | 37 +++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 ipv6/radvd/patches/003-linux_old_compat.patch diff --git a/ipv6/radvd/Makefile b/ipv6/radvd/Makefile index e51b963d5..fe7e72e06 100644 --- a/ipv6/radvd/Makefile +++ b/ipv6/radvd/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=radvd PKG_VERSION:=1.2 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz diff --git a/ipv6/radvd/patches/003-linux_old_compat.patch b/ipv6/radvd/patches/003-linux_old_compat.patch new file mode 100644 index 000000000..2a7d80d93 --- /dev/null +++ b/ipv6/radvd/patches/003-linux_old_compat.patch @@ -0,0 +1,37 @@ +--- radvd-1.2/radvd.h 2008-01-24 12:10:18.000000000 +0200 ++++ radvd-1.2.mod/radvd.h 2009-01-17 22:10:52.000000000 +0200 +@@ -235,4 +235,34 @@ + int privsep_interface_reachtime(const char *iface, uint32_t rtime); + int privsep_interface_retranstimer(const char *iface, uint32_t rettimer); + ++/* ++ * compat hacks in case libc and kernel get out of sync: ++ * ++ * glibc 2.4 and uClibc 0.9.29 introduce IPV6_RECVPKTINFO etc. and change IPV6_PKTINFO ++ * This is only supported in Linux kernel >= 2.6.14 ++ * ++ * This is only an approximation because the kernel version that libc was compiled against ++ * could be older or newer than the one being run. But this should not be a problem -- ++ * we just keep using the old kernel interface. ++ * ++ * these are placed here because they're needed in all of socket.c, recv.c and send.c ++ */ ++#ifdef __linux__ ++# if defined IPV6_RECVHOPLIMIT || defined IPV6_RECVPKTINFO ++# include ++# if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14) ++# if defined IPV6_RECVHOPLIMIT && defined IPV6_2292HOPLIMIT ++# undef IPV6_RECVHOPLIMIT ++# define IPV6_RECVHOPLIMIT IPV6_2292HOPLIMIT ++# endif ++# if defined IPV6_RECVPKTINFO && defined IPV6_2292PKTINFO ++# undef IPV6_RECVPKTINFO ++# undef IPV6_PKTINFO ++# define IPV6_RECVPKTINFO IPV6_2292PKTINFO ++# define IPV6_PKTINFO IPV6_2292PKTINFO ++# endif ++# endif ++# endif ++#endif ++ + #endif -- 2.30.2