From ec90ee23b29aab187c3fa209970aa97434c84b1b Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 13 Aug 2009 05:25:23 -0400 Subject: [PATCH] =?UTF-8?q?Bug=20591511=20=E2=80=93=20hh-blob.c=20does=20n?= =?UTF-8?q?ot=20compile=20using=20mingw=20on=20windows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Check for sys/mman.h, not mprotect(). --- src/hb-blob.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/hb-blob.c b/src/hb-blob.c index 178bc8e18..2abd4ca14 100644 --- a/src/hb-blob.c +++ b/src/hb-blob.c @@ -28,12 +28,12 @@ #include "hb-blob.h" -#ifdef HAVE_MPROTECT +#ifdef HAVE_SYS_MMAN_H #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include -#endif /* HAVE_MPROTECT */ +#endif /* HAVE_SYS_MMAN_H */ struct _hb_blob_t { hb_reference_count_t ref_count; @@ -244,7 +244,7 @@ hb_blob_try_writeable_inplace (hb_blob_t *blob) hb_mutex_lock (blob->lock); -#ifdef HAVE_MPROTECT +#ifdef HAVE_SYS_MMAN_H if (blob->mode == HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITEABLE) { unsigned int pagesize, mask, length; const char *addr; @@ -286,7 +286,7 @@ hb_blob_try_writeable_inplace (hb_blob_t *blob) addr, addr+length, length); #endif } -#else /* !HAVE_MPROTECT */ +#else /* !HAVE_SYS_MMAN_H */ #warning "No way to make readonly memory writeable. This is suboptimal." #endif