fosi.h compilation error - xenomai 2.5.1

I am trying to compile RTT-1.10.2 against a Ubuntu 9.10, kernel 2.6.32.7, Xenomai 2.5.1.

What I've done so far, following the standard intallation procedure on the orocos-1.10.2 directory:
mkdir build
$ cd build
$ cmake .. -DOROCOS_TARGET=xenomai -DLINUX_SOURCE_DIR=/src/linux-2.6.32.7/ -DXENOMAI_INSTALL_DIR=/usr/xenomai/
$ make

/export/home/localadm/src/orocos-rtt-1.10.2/src/os/xenomai/fosi.h: In function ‘int rtos_mutex_rec_unlock(rt_rec_mutex_t*)’:
/export/home/localadm/src/orocos-rtt-1.10.2/src/os/xenomai/fosi.h:291: error: ‘rt_mutex_unlock’ was not declared in this scope

I found in a topic from this forum, a fosi.h that claims to solve that problem (http://www.orocos.org/forum/rtt/rtt-dev/xenomai-compilation-error). However, after trying to compile I get:

/export/home/localadm/src/orocos-rtt-1.10.2/src/os/Mutex.hpp: In member function ‘virtual bool RTT::OS::MutexRecursive::timedlock(RTT::OS::Seconds)’:
/export/home/localadm/src/orocos-rtt-1.10.2/src/os/Mutex.hpp:266: error: ‘rtos_mutex_rec_lock_until’ was not declared in this scope

In an attempt to solve that problem without bugging you guys, I added to fosi.h the following lines of code (I found it in another topic containing the missing function, however this code is intended to be used in macosx):

static inline int rtos_mutex_lock_until( rt_mutex_t* m, NANO_TIME
abs_time)
{
TIME_SPEC arg_time = ticks2timespec( abs_time );
return pthread_mutex_timedlock(m, &arg_time);
}

static inline int rtos_mutex_rec_lock_until( rt_mutex_t* m, NANO_TIME
abs_time)
{
TIME_SPEC arg_time = ticks2timespec( abs_time );
return pthread_mutex_timedlock(m, &arg_time);
}

That of course did not work, after trying to compile I got:
/export/home/localadm/src/orocos-rtt-1.10.2/src/os/xenomai/fosi.h: In function ‘int rtos_mutex_rec_lock_until(rt_mutex_t*, NANO_TIME)’:
/export/home/localadm/src/orocos-rtt-1.10.2/src/os/xenomai/fosi.h:296: error: cannot convert ‘rt_mutex_t*’ to ‘pthread_mutex_t*’ for argument ‘1’ to ‘int pthread_mutex_timedlock(pthread_mutex_t*, const timespec*)

I know you are aware of the fosi.h problem with xenomai, but unfortunately I did not find a solution in this forum for my particular configuration. Any help would be much apreciated.
--
Orocos-Users mailing list
Orocos-Users [..] ...
http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users