Checking for getpagesize in meson.build is
useless if we don't check the resulting define
in the code. So do that.
#include <sys/types.h>
-#if defined(HAVE_MLOCK)
+#if defined(HAVE_SYS_MMAN_H)
#include <sys/mman.h>
#endif
return NULL;
}
-#ifdef HAVE_MMAP
+#if defined(HAVE_MMAP) && defined(HAVE_GETPAGESIZE)
/* A pool with an available item */
Pool *pool = NULL;
g_assert (*sz);
g_assert (during_tag);
-#if defined(HAVE_MLOCK) && defined(HAVE_MMAP)
+#if defined(HAVE_MLOCK) && defined(HAVE_MMAP) && defined(HAVE_GETPAGESIZE)
/* Make sure sz is a multiple of the page size */
unsigned long pgsize = getpagesize ();
{
g_assert (pages);
-#if defined(HAVE_MLOCK)
+#if defined(HAVE_MLOCK) && defined(HAVE_GETPAGESIZE)
g_assert (sz % getpagesize () == 0);
if (munlock (pages, sz) < 0 && gtk_secure_warnings)