about summary refs log tree commit diff
path: root/sysdeps/generic
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/generic')
-rw-r--r--sysdeps/generic/brk.c5
-rw-r--r--sysdeps/generic/dl-brk.c5
-rw-r--r--sysdeps/generic/dl-sbrk.c5
3 files changed, 12 insertions, 3 deletions
diff --git a/sysdeps/generic/brk.c b/sysdeps/generic/brk.c
index 8b8b734e33..b951819f21 100644
--- a/sysdeps/generic/brk.c
+++ b/sysdeps/generic/brk.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996, 1997, 2002 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
@@ -19,6 +19,9 @@
 #include <errno.h>
 #include <unistd.h>
 
+/* sbrk.c expects this.  */
+void *__curbrk;
+
 /* Set the end of the process's data space to ADDR.
    Return 0 if successful, -1 if not.  */
 int
diff --git a/sysdeps/generic/dl-brk.c b/sysdeps/generic/dl-brk.c
index 4a0cf2da11..c37cdfec33 100644
--- a/sysdeps/generic/dl-brk.c
+++ b/sysdeps/generic/dl-brk.c
@@ -1,2 +1,5 @@
-/* Just use the normal code.  */
+/* We can use the normal code but we also know the __curbrk is not exported
+   from ld.so.  */
+extern void *__curbrk attribute_hidden;
+
 #include <brk.c>
diff --git a/sysdeps/generic/dl-sbrk.c b/sysdeps/generic/dl-sbrk.c
index 3874975890..4713a92694 100644
--- a/sysdeps/generic/dl-sbrk.c
+++ b/sysdeps/generic/dl-sbrk.c
@@ -1,2 +1,5 @@
-/* Just use the normal code.  */
+/* We can use the normal code but we also know the __curbrk is not exported
+   from ld.so.  */
+extern void *__curbrk attribute_hidden;
+
 #include <sbrk.c>