From 2105b84e8c2ffa25458d0e5430f9862fffa13230 Mon Sep 17 00:00:00 2001 From: Erwin Janssen Date: Tue, 14 Mar 2017 22:14:46 +0100 Subject: [PATCH] Use #ifdef instead of #if in gvloadimage_core.c Replace `#if HAVE_SYS_MMAN_H` with `#ifdef HAVE_SYS_MMAN_H`. Using the former causes problems is HAVE_SYS_MMAN_H is defined without a value. --- plugin/core/gvloadimage_core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin/core/gvloadimage_core.c b/plugin/core/gvloadimage_core.c index eb85c3c6c..d9bbc0b10 100644 --- a/plugin/core/gvloadimage_core.c +++ b/plugin/core/gvloadimage_core.c @@ -16,7 +16,7 @@ #include #include #include -#if HAVE_SYS_MMAN_H +#ifdef HAVE_SYS_MMAN_H #include #endif #ifdef _MSC_VER @@ -140,7 +140,7 @@ static void core_loadimage_vrml(GVJ_t * job, usershape_t *us, boxf b, boolean fi static void ps_freeimage(usershape_t *us) { -#if HAVE_SYS_MMAN_H +#ifdef HAVE_SYS_MMAN_H munmap(us->data, us->datasize); #else free(us->data); @@ -175,7 +175,7 @@ static void core_loadimage_ps(GVJ_t * job, usershape_t *us, boxf b, boolean fill case FT_EPS: fstat(fd, &statbuf); us->datasize = statbuf.st_size; -#if HAVE_SYS_MMAN_H +#ifdef HAVE_SYS_MMAN_H us->data = mmap(0, statbuf.st_size, PROT_READ, MAP_SHARED, fd, 0); #else us->data = malloc(statbuf.st_size); -- 2.40.0