[Openswan Users] openswan 2.4.0 build with 2.4.31

Michele Baldessari michele-lists at pupazzo.org
Thu Sep 15 21:46:01 CEST 2005


* Arkadiusz Patyk (areq at areq.eu.org) wrote:
> I have a problem with openswan 2.4.0 and kernel  2.4.31

Happens with any 2.4.x series.

> i686-pld-linux-gcc -D__KERNEL__
> -I/home/areq/rpm/BUILD/linux-2.4.31/include -Wall -Wstrict-prototypes
> -Wno-trigra
> phs -O2 -fno-strict-aliasing -fno-common -Wno-sign-compare
> -fomit-frame-pointer -pipe -mpreferred-stack-boundary=
> 2 -march=i686  -DMODULE  -nostdinc -iwithprefix include
> -DKBUILD_BASENAME=dir_cap  -c -o dir_cap.o dir_cap.c
> pfkey_v2.c: In function `pfkey_release':
> pfkey_v2.c:824: error: `pfkey_sock_lock' undeclared (first use in this
> function)
> pfkey_v2.c:824: error: (Each undeclared identifier is reported only
> once
> pfkey_v2.c:824: error: for each function it appears in.)

I stumbled into this too (2.4.0dr1 also has this). From a quick glance at the code
(pfkey_sock_lock is defined only in NET_26...), completely untested, compiles fine:

--- pfkey_v2.c.orig	2005-09-15 20:38:39.722035860 +0200
+++ pfkey_v2.c	2005-09-15 20:30:18.336577756 +0200
@@ -820,9 +820,9 @@
 			    "No sk attached to sock=0p%p.\n", sock);
 		return 0; /* -EINVAL; */
 	}
-
+#ifdef NET_26
 	write_lock_bh(&pfkey_sock_lock);
-
+#endif
 	KLIPS_PRINT(debug_pfkey,
 		    "klips_debug:pfkey_release: "
 		    "sock=0p%p sk=0p%p\n", sock, sk);
@@ -852,9 +852,9 @@
 		    "klips_debug:pfkey_release: "
 		    "succeeded.\n");
 
-
+#ifdef NET_26
 	write_unlock_bh(&pfkey_sock_lock);
-
+#endif
 	return 0;
 }
 

Someone more experienced with openswan's codebase might want to take a
look at this issue, though.

ciao,
Michele
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.openswan.org/pipermail/users/attachments/20050915/a6eff71c/attachment.bin


More information about the Users mailing list