From d2c736f809690dd69f1cade53a61b99e401bb0e3 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 15 Feb 2012 14:14:59 -0800 Subject: [PATCH] Hurd: #define away madvise for malloc code. --- ChangeLog | 3 +++ sysdeps/mach/hurd/malloc-machine.h | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 131caa687a..2aba4a9c44 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,9 @@ 2012-02-15 Roland McGrath + [BZ #4822] + * sysdeps/mach/hurd/malloc-machine.h (madvise): New macro. + * mach/devstream.c (cookie_io_functions_t): Macro removed. (write, read, close): Likewise. Patch by Aurelien Jarno . diff --git a/sysdeps/mach/hurd/malloc-machine.h b/sysdeps/mach/hurd/malloc-machine.h index 690732778e..56ae26db62 100644 --- a/sysdeps/mach/hurd/malloc-machine.h +++ b/sysdeps/mach/hurd/malloc-machine.h @@ -1,6 +1,6 @@ /* Basic platform-independent macro definitions for mutexes, thread-specific data and parameters for malloc. - Copyright (C) 2003, 2008 Free Software Foundation, Inc. + Copyright (C) 2003-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -62,6 +62,10 @@ __libc_tsd_define (static, void *, MALLOC) /* declaration/common definition */ #define tsd_setspecific(key, data) __libc_tsd_set (void *, MALLOC, (data)) #define tsd_getspecific(key, vptr) ((vptr) = __libc_tsd_get (void *, MALLOC)) +/* madvise is a stub on Hurd, so don't bother calling it. */ +#undef madvise +#define madvise(addr, len, advice) ((void) ((addr), (len), (advice))) + #include #endif /* !defined(_MALLOC_MACHINE_H) */ -- 2.43.5