packages/net/ipsec-tools/patches/006-linux-3.7-compat.patch
juhosg 357501e799 ipsec-tools: update to 0.8.1
This patch updates ipsec-tools to version 0.8.1 and refreshes its
patches. It was released on Sourceforge on 2013-01-08.
Compile and run tested, no problems found.

Patch-by: Anton van Bohemen <avbohemen@ziggo.nl>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/packages@35640 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-02-17 12:24:28 +00:00

51 lines
1.4 KiB
Diff

--- a/configure.ac
+++ b/configure.ac
@@ -74,9 +74,10 @@ case "$host_os" in
[ KERNEL_INCLUDE="/lib/modules/`uname -r`/build/include" ])
AC_CHECK_HEADER($KERNEL_INCLUDE/linux/pfkeyv2.h, ,
- [ AC_CHECK_HEADER(/usr/src/linux/include/linux/pfkeyv2.h,
- KERNEL_INCLUDE=/usr/src/linux/include ,
- [ AC_MSG_ERROR([Unable to find linux-2.6 kernel headers. Aborting.]) ] ) ] )
+ [ AC_CHECK_HEADER($KERNEL_INCLUDE/uapi/linux/pfkeyv2.h, ,
+ [ AC_CHECK_HEADER(/usr/src/linux/include/linux/pfkeyv2.h,
+ KERNEL_INCLUDE=/usr/src/linux/include ,
+ [ AC_MSG_ERROR([Unable to find linux-2.6 kernel headers. Aborting.]) ] ) ] ) ] )
AC_SUBST(KERNEL_INCLUDE)
# We need the configure script to run with correct kernel headers.
# However we don't want to point to kernel source tree in compile time,
@@ -643,7 +644,14 @@ AC_EGREP_CPP(yes,
#ifdef SADB_X_EXT_NAT_T_TYPE
yes
#endif
-], [kernel_natt="yes"])
+], [kernel_natt="yes"], [
+ AC_EGREP_CPP(yes,
+ [#include <uapi/linux/pfkeyv2.h>
+ #ifdef SADB_X_EXT_NAT_T_TYPE
+ yes
+ #endif
+ ], [kernel_natt="yes"])
+])
;;
freebsd*|netbsd*)
# NetBSD case
--- a/src/include-glibc/Makefile.am
+++ b/src/include-glibc/Makefile.am
@@ -1,14 +1,7 @@
-
-.includes: ${top_builddir}/config.status
- ln -snf $(KERNEL_INCLUDE)/linux
- touch .includes
-
-all: .includes
-
EXTRA_DIST = \
glibc-bugs.h \
net/pfkeyv2.h \
netinet/ipsec.h \
sys/queue.h
-DISTCLEANFILES = .includes linux
+DISTCLEANFILES = linux