Ramsay Jones wrote:

> --- a/compat/nedmalloc/malloc.c.h
> +++ b/compat/nedmalloc/malloc.c.h
> @@ -484,6 +484,10 @@ MAX_RELEASE_CHECK_RATE   default: 4095 unless not 
>  #define DLMALLOC_VERSION 20804
>  #endif /* DLMALLOC_VERSION */
> +#if defined(linux)
> +#define _GNU_SOURCE 1
> +#endif

If we want to do this, I'd suggest defining _GNU_SOURCE
unconditionally.  Other platforms using glibc would benefit from it,
too, and other platforms not using glibc shouldn't care.

Alternatively it could make sense to see if the latest version from
Niall Douglas[1] works, which includes the following:

        #ifndef HAVE_MREMAP
        #ifdef linux
        #define HAVE_MREMAP 1
        #ifndef _GNU_SOURCE
        #define _GNU_SOURCE /* Turns on mremap() definition */
        #else   /* linux */
        #define HAVE_MREMAP 0
        #endif  /* linux */
        #endif  /* HAVE_MREMAP */

It looks equally wrong there, but since it comes from upstream we
could just punt to him if anyone runs into problems. ;-)

My two cents,

[1] http://www.nedprod.com/programs/portable/nedmalloc/
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to