--- orig/openmpi-1.6.3/opal/mca/shmem/sysv/shmem_sysv_component.c 2012-04-03 16:29:49.000000000 +0200 +++ openmpi-1.6.3/opal/mca/shmem/sysv/shmem_sysv_component.c 2012-11-01 21:54:18.687021300 +0100 @@ -43,6 +43,7 @@ #endif /* HAVE_SYS_IPC_H */ #if HAVE_SYS_SHM_H #include +#include #endif /* HAVE_SYS_SHM_H */ #include "opal/constants.h" @@ -165,7 +166,7 @@ /* if we are here, then let the run-time test games begin */ if (-1 == (shmid = shmget(IPC_PRIVATE, (size_t)(getpagesize()), - IPC_CREAT | IPC_EXCL | SHM_R | SHM_W))) { + IPC_CREAT | IPC_EXCL | S_IRWXU ))) { goto out; } else if ((void *)-1 == (addr = shmat(shmid, NULL, 0))) { --- orig/openmpi-1.6.3/opal/mca/shmem/sysv/shmem_sysv_module.c 2012-04-03 16:29:49.000000000 +0200 +++ openmpi-1.6.3/opal/mca/shmem/sysv/shmem_sysv_module.c 2012-11-01 21:55:21.316603500 +0100 @@ -41,6 +41,7 @@ #endif /* HAVE_SYS_IPC_H */ #if HAVE_SYS_SHM_H #include +#include #endif /* HAVE_SYS_SHM_H */ #ifdef HAVE_STRING_H #include @@ -197,7 +198,7 @@ * real_size here */ if (-1 == (ds_buf->seg_id = shmget(IPC_PRIVATE, real_size, - IPC_CREAT | IPC_EXCL | SHM_R | SHM_W))) { + IPC_CREAT | IPC_EXCL | S_IRWXU ))) { int err = errno; char hn[MAXHOSTNAMELEN]; gethostname(hn, MAXHOSTNAMELEN - 1);