Help with a code snippet that fails in mock buildroots

Deji Akingunola dakingun at gmail.com
Sat Apr 12 02:07:44 UTC 2008


Hi all,

Can someone please explain (and possibly provide a solution) to me why
the code below is failing in mock buildroot. It is run to check if the
'shm_open' function works when configuring latest mpich2 package, and
its result is used to create a definition that's used later when
compiling the package. The code runs fine (and the package builds fine
too) on my rawhide system.
Thanks.

Deji

PS: A koji scratch build that failed can be found at
http://koji.fedoraproject.org/koji/taskinfo?taskID=561558

>>
#include <sys/types.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <errno.h>
#include <unistd.h>

int main(int argc, char ** argv)
{
   int fd;

   fd = shm_open("/mpich2conf", O_RDWR | O_CREAT, 0666);
   if (fd == -1)
   {
       if (errno == ENOSYS)
       {
           return 1;
       }
   }
   else
   {
       shm_unlink("/mpich2conf");
       close(fd);
   }
   return 0;
}
<<




More information about the fedora-devel-list mailing list