From b96aca4d05b2da5d5134b1c3176b16f48db9fe4d Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 3 Sep 2017 04:25:35 +0200 Subject: hurd: Fix rtld link * sysdeps/mach/hurd/dl-sysdep.c (__sbrk): New function. --- sysdeps/mach/hurd/dl-sysdep.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'sysdeps/mach') 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) { -- cgit 1.4.1