Hi all,

I tried to compile Xenomai 2.5rc4 with uClibc 0.9.30.1 and ran into some 
problems with references to the 
posix functions shm_open and shm_unlink in /src/skins/posix/wrappers.c, 
which do not exist in uClibc.

Unlinke in  /src/skins/posix/shm.c the existence of these functions is not 
verfied (via #ifdef HAVE_SHM_*)
and the build fails.

The following patch is a quick and dirty fix for this problem. I hope this 
might be helpful.


diff -Nur xenomai-2.4.93.orig/src/skins/posix/wrappers.c 
xenomai-2.4.93.work/src/skins/posix/wrappers.c
--- xenomai-2.4.93.orig/src/skins/posix/wrappers.c      2009-03-30 
12:24:50.000000000 +0200
+++ xenomai-2.4.93.work/src/skins/posix/wrappers.c      2009-12-07 
14:22:03.983876500 +0100
@@ -245,17 +245,21 @@
 }
 
 /* shm */
+#ifdef HAVE_SHM_OPEN
 __attribute__ ((weak))
 int __real_shm_open(const char *name, int oflag, mode_t mode)
 {
        return shm_open(name, oflag, mode);
 }
+#endif
 
+#ifdef HAVE_SHM_UNLINK
 __attribute__ ((weak))
 int __real_shm_unlink(const char *name)
 {
        return shm_unlink(name);
 }
+#endif
 
 __attribute__ ((weak))
 int __real_ftruncate(int fildes, long length)




Best regards,
Hagen Langbartels

SIEB & MEYER AG
Dipl.-Inf. (FH) Hagen Langbartels

Auf dem Schmaarkamp 21
21339 L√ľneburg
Germany
Tel.: +49-4131-203-1133
Fax.: +49-4131-38562
E-mail: developm...@sieb-meyer.de
www.sieb-meyer.de

Vorstand: Markus Meyer, Torsten Blankenburg
Aufsichtsratsvorsitzender: Hans Reinen
Amtsgericht L√ľneburg: HRB 1805
Umsatzsteuer-ID.-Nr.: DE 116085664
_______________________________________________
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core

Reply via email to