From 0f2e103c67d602a7bda2143ec3d382a8e7c91ecd Mon Sep 17 00:00:00 2001 From: GNU Libc Maintainers Date: Sun, 14 Jan 2018 10:24:48 +0000 Subject: [PATCH] git-rtld-sbrk commit b96aca4d05b2da5d5134b1c3176b16f48db9fe4d Author: Samuel Thibault Date: Sun Sep 3 04:25:35 2017 +0200 hurd: Fix rtld link * sysdeps/mach/hurd/dl-sysdep.c (__sbrk): New function. Gbp-Pq: Topic hurd-i386 Gbp-Pq: Name git-rtld-sbrk.diff --- sysdeps/mach/hurd/dl-sysdep.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sysdeps/mach/hurd/dl-sysdep.c b/sysdeps/mach/hurd/dl-sysdep.c index d73dd17f0..57a1888e7 100644 --- a/sysdeps/mach/hurd/dl-sysdep.c +++ b/sysdeps/mach/hurd/dl-sysdep.c @@ -590,6 +590,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) { -- 2.30.2