From 365ded42dba188ef3a9ad92aec283687d1e9da67 Mon Sep 17 00:00:00 2001 From: Daniel Gibson Date: Fri, 26 Nov 2010 21:57:14 +0000 Subject: [PATCH] fixed mremap() usage on linux --- src/unix/hunk.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/unix/hunk.c b/src/unix/hunk.c index cd62d43e..68610328 100644 --- a/src/unix/hunk.c +++ b/src/unix/hunk.c @@ -24,8 +24,14 @@ * ======================================================================= */ -#include + +/* For mremap() - must be before sys/mman.h include! */ +#if defined( __linux__ ) + #define _GNU_SOURCE +#endif + #include +#include #include #include "../common/header/common.h" @@ -35,10 +41,6 @@ #define MAP_ANONYMOUS MAP_ANON #endif -/* For mremap() */ -#if defined( __linux__ ) - #define __USE_GNU -#endif byte *membase; int maxhunksize;