aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@schwinge.name>2012-02-17 08:46:28 +0100
committerThomas Schwinge <thomas@schwinge.name>2012-02-17 08:46:28 +0100
commit9078ce930afda8bbcba6fe860a13ca62abcf2742 (patch)
treed5bb4e4dce0dd0013efbc31bb7f76c14fd52adfa
parent3835c55fe5fa30715f16b0d859dae197e4c46bd2 (diff)
downloadglibc-9078ce930afda8bbcba6fe860a13ca62abcf2742.tar
glibc-9078ce930afda8bbcba6fe860a13ca62abcf2742.tar.gz
glibc-9078ce930afda8bbcba6fe860a13ca62abcf2742.tar.bz2
glibc-9078ce930afda8bbcba6fe860a13ca62abcf2742.zip
Hurd: #define away madvise for malloc code, fix previous commit.
-rw-r--r--ChangeLog6
-rw-r--r--sysdeps/mach/hurd/malloc-machine.h5
2 files changed, 10 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 2ddc860bc8..0a80111a73 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-02-17 Thomas Schwinge <thomas@schwinge.name>
+
+ [BZ #4822]
+ * sysdeps/mach/hurd/malloc-machine.h: #include <sys/mman.h>.
+ (madvise): Cast every argument to void on its own.
+
2012-02-17 Joseph Myers <joseph@codesourcery.com>
[BZ #9902]
diff --git a/sysdeps/mach/hurd/malloc-machine.h b/sysdeps/mach/hurd/malloc-machine.h
index 56ae26db62..4a8bd16e6c 100644
--- a/sysdeps/mach/hurd/malloc-machine.h
+++ b/sysdeps/mach/hurd/malloc-machine.h
@@ -63,8 +63,11 @@ __libc_tsd_define (static, void *, MALLOC) /* declaration/common definition */
#define tsd_getspecific(key, vptr) ((vptr) = __libc_tsd_get (void *, MALLOC))
/* madvise is a stub on Hurd, so don't bother calling it. */
+
+#include <sys/mman.h>
+
#undef madvise
-#define madvise(addr, len, advice) ((void) ((addr), (len), (advice)))
+#define madvise(addr, len, advice) ((void) (addr), (void) (len), (void) (advice))
#include <sysdeps/generic/malloc-machine.h>