diff -Naur p11-kit-0.20.2/common/compat.c p11-kit-0.20.2-new/common/compat.c --- p11-kit-0.20.2/common/compat.c 2013-10-14 14:45:10.000000000 +0200 +++ p11-kit-0.20.2-new/common/compat.c 2014-02-12 21:28:03.000000000 +0100 @@ -218,7 +218,7 @@ map->size = sb->st_size; map->data = mmap (NULL, map->size, PROT_READ, MAP_PRIVATE, map->fd, 0); - if (map->data == NULL) { + if (map->data == MAP_FAILED) { close (map->fd); free (map); return NULL;