[omniORB-dev] Porting to vxWorks 6.6-correction

Yakov Gerlovin Yakov.Gerlovin at ecitele.com
Fri Sep 26 12:15:25 BST 2008


Hello,

I'd like to share with you the fix I made, while compiling the omniORB for vxWorks (I'm running Workbench 3.0 under WinXP).
The problem is that for some strange reason the  'inet_addr' function is declared as

u_long inet_addr(register char *inetString)

and the compiler generates the following errors when compiling  orbcore\transportRules.cc (Revision 1.1.4.8)

omniORB/orbcore/transportRules.cc: In member function 'virtual CORBA::Boolean omni::builtinIPv4Rule::match(const char*)':
omniORB/orbcore/transportRules.cc:287: error: invalid conversion from 'const char*' to 'char*'
omniORB/orbcore/transportRules.cc:287: error:   initializing argument 1 of 'long unsigned int inet_addr(char*)'
omniORB/orbcore/transportRules.cc:294: error: invalid conversion from 'const char*' to 'char*'
omniORB/orbcore/transportRules.cc:294: error:   initializing argument 1 of 'long unsigned int inet_addr(char*)'
omniORB/orbcore/transportRules.cc: In static member function 'static CORBA::Boolean omni::builtinRuleType::parseIPv4AddressMask(const char*, CORBA::ULong&, CORBA::ULong&)':
omniORB/orbcore/transportRules.cc:476: error: invalid conversion from 'const char*' to 'char*'
omniORB/orbcore/transportRules.cc:476: error:   initializing argument 1 of 'long unsigned int inet_addr(char*)'

the fix is obvious:

#287:  CORBA::ULong address = inet_addr((char*)ipv4.in());
#294: CORBA::ULong address = inet_addr((char*)ipv4.in() + 7);
#476: network = inet_addr((char*)cp.in());


Kind regards,
Yakov
-------------- next part --------------
A non-text attachment was scrubbed...
Name: transportRules.cc
Type: application/octet-stream
Size: 21835 bytes
Desc: transportRules.cc
Url : http://www.omniorb-support.com/pipermail/omniorb-dev/attachments/20080926/97b762b7/transportRules-0001.obj


More information about the omniORB-dev mailing list