[Openswan dev] Compile error on kernel 2.4.18

Ilan Tayari ilan at cogniview.com
Wed Oct 3 09:56:23 EDT 2007


Hello,


Here's a little story I've gone through:
I'm trying to install OpenSwan 2.4.9 on an old RedHat 8.0 router machine.
It comes with a stock 2.4.18-14 kernel (I know there's an update to 
2.4.20, but I wish to keep the current kernel, and I also don't need 
NAT-T support)

While compiling the module (make module), I got this:
/root/openswan-2.4.9/linux/net/ipsec/ipsec_proc.c:619: parse error 
before "int"
/root/openswan-2.4.9/linux/net/ipsec/ipsec_proc.c:619: warning: type 
defaults to `int' in declaration of `module_param'
/root/openswan-2.4.9/linux/net/ipsec/ipsec_proc.c:619: warning: function 
declaration isn't a prototype
/root/openswan-2.4.9/linux/net/ipsec/ipsec_proc.c:619: warning: data 
definition has no type or storage class

This is apparently because of the module_param macro on that line, which 
reads:
module_param(natt_available, int, 0444);

Looking it up (I'm no kernel developer), I found this:
http://tldp.org/LDP/lkmpg/2.6/html/x323.html
but this is for 2.6 series...

looking further, I found this:
http://lwn.net/Articles/107303/
and this (from 2.4)
http://tldp.org/LDP/lkmpg/2.4/html/x354.html

As a quick fix, I commented out that line, so I don't have that 
parameter, and it compiled fine.
I believe this should be fixed with an #ifdef, so that it uses 
MODULE_PARM if compiled against 2.4 kernels, or module_param if 
compiling against 2.6 kernels

In the meantime, OpenSwap does not appear to compile well on 2.4 kernels.
Hope this helps anyone (either to fix this, or to work around it)

Ilan

Convert PDF to Excel: http://www.cogniview.com <http://www.cogniview.com>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openswan.org/pipermail/dev/attachments/20071003/7e801ae2/attachment-0001.html 


More information about the Dev mailing list