about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2017-09-03 04:25:35 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2017-09-03 04:26:31 +0200
commitb96aca4d05b2da5d5134b1c3176b16f48db9fe4d (patch)
treeb3a9a0915f8c141ff4a474edf92df8ddc2d05bbb
parent819ea3347e3a30a611488ceeec53650baaeb7961 (diff)
downloadglibc-b96aca4d05b2da5d5134b1c3176b16f48db9fe4d.tar.gz
glibc-b96aca4d05b2da5d5134b1c3176b16f48db9fe4d.tar.xz
glibc-b96aca4d05b2da5d5134b1c3176b16f48db9fe4d.zip
hurd: Fix rtld link
	* sysdeps/mach/hurd/dl-sysdep.c (__sbrk): New function.
-rw-r--r--ChangeLog3
-rw-r--r--sysdeps/mach/hurd/dl-sysdep.c10
2 files changed, 12 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 2e6083b372..11edadd5fc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -18,7 +18,8 @@
 	Fix <unistd.h> inclusion.
 	* sysdeps/posix/pwritev2.c: Include <errno.h>.
 	* sysdeps/posix/pwritev64v2.c: Include <errno.h>.
-	* sysdeps/mach/hurd/dl-sysdep.c (__access_noerrno): New function.
+	* sysdeps/mach/hurd/dl-sysdep.c (__access_noerrno, __sbrk): New
+	functions.
 
 2017-09-01  Joseph Myers  <joseph@codesourcery.com>
 
diff --git a/sysdeps/mach/hurd/dl-sysdep.c b/sysdeps/mach/hurd/dl-sysdep.c
index 2bfa64f02a..dec00f35f0 100644
--- a/sysdeps/mach/hurd/dl-sysdep.c
+++ b/sysdeps/mach/hurd/dl-sysdep.c
@@ -591,6 +591,16 @@ __getcwd (char *buf, size_t size)
   return NULL;
 }
 
+/* This is used by dl-tunables.c to strdup strings.  We can just make this a
+   mere allocation.  */
+void *
+__sbrk (intptr_t increment)
+{
+  vm_address_t addr;
+  __vm_allocate (__mach_task_self (), &addr, increment, 1);
+  return (void *) addr;
+}
+
 void weak_function attribute_hidden
 _exit (int status)
 {