Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Porting linux compatible code on qnx: (6 Items)
   
Porting linux compatible code on qnx  
Hi All,
I am trying to port strongswan ipsec stack on qnx/arm.The code is written for linux 2.6 kernel.I am facing many problems
 while compiling the stack  some of them are:

1)getopt.h file is not present. 

2)-rdynamic : option in Makefile is unrecognized 
3) sys/prctl.h:file is not present. 

so how can I resolve these issues.

Please help me I am new to UNIX/QNX world.

Regards
Aditya
Re: Porting linux compatible code on qnx  
aditya vikram wrote:
> Hi All,
> I am trying to port strongswan ipsec stack on qnx/arm.The code is written for linux 2.6 kernel.I am facing many 
problems while compiling the stack  some of them are:

> 2)-rdynamic : option in Makefile is unrecognized 

Replace -rdynamic with -Wl,--export-dynamic.

The other two missing headers will require you to port your code to 
Neutrino. I'd suggest reading the documentation.

Regards,

Ryan Mansfield

Re: Porting linux compatible code on qnx  
1. getopt() is located in unistd.h
2. prctl is linux only.  QNX has a different set of operations on processes. You'll probably have to rewrite the code to
 
use the QNX operations. Have a looks at the posix_* functions in the qnx library reference.




aditya vikram wrote:
> Hi All,
> I am trying to port strongswan ipsec stack on qnx/arm.The code is written for linux 2.6 kernel.I am facing many 
problems while compiling the stack  some of them are:
> 
> 1)getopt.h file is not present. 
> 
> 2)-rdynamic : option in Makefile is unrecognized 
> 3) sys/prctl.h:file is not present. 
> 
> so how can I resolve these issues.
> 
> Please help me I am new to UNIX/QNX world.
> 
> Regards
> Aditya
> 
> 
> _______________________________________________
> OSTech
> http://community.qnx.com/sf/go/post31233
> 

Re: Porting linux compatible code on qnx  
Attilla Danko wrote:
> 1. getopt() is located in unistd.h

getopt_long isn't implemented under Neutrino (which strongswan uses). 
Simply replacing the getopt.h include with unistd.h will not work. The 
code will need to be modified.

Regards,

Ryan Mansfield
Re: Porting linux compatible code on qnx  
It's probably simpler to grab the implementation from gnulib.  Ideally,
the autoconf should be changed to do an AC_LIBOBJ or similar.

On Tue, 2009-06-09 at 12:14 -0400, Ryan Mansfield wrote:
> Attilla Danko wrote:
> > 1. getopt() is located in unistd.h
> 
> getopt_long isn't implemented under Neutrino (which strongswan uses). 
> Simply replacing the getopt.h include with unistd.h will not work. The 
> code will need to be modified.
> 
> Regards,
> 
> Ryan Mansfield
> 
> _______________________________________________
> OSTech
> http://community.qnx.com/sf/go/post31242
> 
Re: Porting linux compatible code on qnx  
Actually there is a bsd version too

Neil Schellenberger wrote:
> It's probably simpler to grab the implementation from gnulib.  Ideally,
> the autoconf should be changed to do an AC_LIBOBJ or similar.
> 
> On Tue, 2009-06-09 at 12:14 -0400, Ryan Mansfield wrote:
>> Attilla Danko wrote:
>>> 1. getopt() is located in unistd.h
>> getopt_long isn't implemented under Neutrino (which strongswan uses). 
>> Simply replacing the getopt.h include with unistd.h will not work. The 
>> code will need to be modified.
>>
>> Regards,
>>
>> Ryan Mansfield
>>
>> _______________________________________________
>> OSTech
>> http://community.qnx.com/sf/go/post31242
>>
> 
> _______________________________________________
> OSTech
> http://community.qnx.com/sf/go/post31250
> 

-- 
cburgess@qnx.com