Hi

I am trying to compile the opsec userland code for openswan 1.0.1 within an slink 
chrooted environment. Basically I am missing a few type declarations.

here is my compile command, do not be fooled by the freeswan directory name 

make KERNELSRC=/src/2.4.24/linux \         
PRIVDIR=/src/2.4.24/freeswan-inst/privdir \ 
PUBDIR=/src/2.4.24/freeswan-inst/pubdir \        
CONFDIR=/src/2.4.24/freeswan-inst/confdir \
DESTDIR=/src/2.4.24/freeswan-inst/destdir         \
HOSTCC=gcc KERNELREL=2.4        \
SUBDIRS=lib     programs

make[1]: Entering directory `/src/2.4.24/freeswan/lib'
cc -I. -g -O3 -Wall -Wpointer-arith -Wcast-qual -Wstrict-prototypes 
-Wbad-function-cast  -DNAT_TRAVERSAL   -c addrtoa.c -o addrtoa.o
In file included from addrtoa.c:18:
openswan.h:97: parse error before `__u8'
openswan.h:97: warning: no semicolon at end of struct or union
openswan.h:97: warning: no semicolon at end of struct or union
openswan.h:98: warning: data definition has no type or storage class
openswan.h:99: parse error before `u6_addr32'
openswan.h:99: warning: data definition has no type or storage class
openswan.h:100: parse error before `}'
openswan.h:100: warning: data definition has no type or storage class
openswan.h:104: parse error before `}'
openswan.h:107: parse error before `__u16'
openswan.h:107: warning: no semicolon at end of struct or union
openswan.h:108: warning: data definition has no type or storage class
openswan.h:110: parse error before `sin6_scope_id'
openswan.h:110: warning: data definition has no type or storage class
openswan.h:118: field `v6' has incomplete type
openswan.h:109: storage size of `sin6_addr' isn't known
make[1]: *** [addrtoa.o] Error 1
make[1]: Leaving directory `/src/2.4.24/freeswan/lib'
make: *** [programs] Error 2

If I compile using the kernel environment by supplying USERCOMPILE=-D__KERNEL__ some 
of the missing types are resolved. It looks as if the u_intxx_t types are not defined 
this way.

make KERNELSRC=/src/2.4.24/linux \         
PRIVDIR=/src/2.4.24/freeswan-inst/privdir \ 
PUBDIR=/src/2.4.24/freeswan-inst/pubdir \        
CONFDIR=/src/2.4.24/freeswan-inst/confdir \
DESTDIR=/src/2.4.24/freeswan-inst/destdir         \
HOSTCC=gcc KERNELREL=2.4        \
USERCOMPILE=-D__KERNEL__ \
SUBDIRS=lib     programs

cc -I. -D__KERNEL__ -Wall -Wpointer-arith -Wcast-qual -Wstrict-prototypes 
-Wbad-function-cast  -DNAT_TRAVERSAL   -c addrtoa.c -o addrtoa.o
In file included from addrtoa.c:18:
openswan.h:105: redefinition of `struct sockaddr_in6'
openswan.h:195: parse error before `u_int8_t'
openswan.h:195: warning: function declaration isn't a prototype
make[1]: *** [addrtoa.o] Error 1
make[1]: Leaving directory `/src/2.4.24/freeswan/lib'
make: *** [programs] Error 2

So obviously the kernel headers seem to be insufficient for the userland code at least 
for openswan 1.0.1

thanks for hints
Erich

THINK 
Püntenstrasse 39 
8143 Stallikon 
mailto:[EMAIL PROTECTED] 
PGP Fingerprint: BC9A 25BC 3954 3BC8 C024 8D8A B7D4 FF9D 05B8 0A16




-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click

_______________________________________________
leaf-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-devel

Reply via email to