Hi,

I have bumped on a compilation failure of Xenomai 2.3.1 with uClibc.
The shm_open/shm_unlink may not be available, at all.
So here's a basic patch against 2.3.1, FWIW.

diff -u -r1.1.1.5 configure.in
--- configure.in        26 Dec 2006 18:39:27 -0000      1.1.1.5
+++ configure.in        28 Mar 2007 13:33:30 -0000
@@ -567,6 +567,11 @@
        AC_DEFINE(CONFIG_XENO_POSIX_AUTO_MLOCKALL,1,[config])
 fi
 
+save_LIBS="$LIBS"
+LIBS="$LIBS -lrt"
+AC_CHECK_FUNCS([shm_open shm_unlink])
+LIBS="$save_LIBS"
+
 dnl
 dnl Build the Makefiles
 dnl
--- src/skins/posix/shm.c       26 Dec 2006 18:39:00 -0000      1.1.1.1
+++ src/skins/posix/shm.c       28 Mar 2007 13:33:30 -0000
@@ -39,8 +39,10 @@
        if (!err)
                return fd;
 
+#ifdef HAVE_SHM_OPEN
        if (err == ENOSYS)
                return __real_shm_open(name, oflag, mode);
+#endif
 
        close(fd);
        errno = err;
@@ -55,8 +57,10 @@
        if (!err)
                return 0;
 
+#ifdef HAVE_SHM_UNLINK
        if (err == ENOSYS)
                return __real_shm_unlink(name);
+#endif
        
        errno = err;
        return -1;

-- 
Stephane

_______________________________________________
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core

Reply via email to