implement sbrk() by calling hoard's version, through sbrk_hook (fct pointer was named this way in R5).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17540 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
712c1e8c39
commit
3ad603ace4
@ -34,6 +34,8 @@
|
||||
# define CTRACE(x) ;
|
||||
#endif
|
||||
|
||||
extern "C" void *(*sbrk_hook)(long);
|
||||
void *(*sbrk_hook)(long) = &BPrivate::hoardSbrk;
|
||||
|
||||
using namespace BPrivate;
|
||||
|
||||
|
@ -7,10 +7,13 @@
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
|
||||
/* in hoard wrapper */
|
||||
extern void *(*sbrk_hook)(long);
|
||||
|
||||
void *
|
||||
sbrk(long increment)
|
||||
{
|
||||
// this function is no longer supported
|
||||
if (sbrk_hook)
|
||||
return (*sbrk_hook)(increment);
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user