From b5c77cf4f619e8487dc434317a7472152c622a8f Mon Sep 17 00:00:00 2001 From: David Carlier Date: Fri, 5 Jun 2020 15:32:27 +0100 Subject: libdislocator, adding subset of specific NetBSD api. --- libdislocator/libdislocator.so.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'libdislocator') diff --git a/libdislocator/libdislocator.so.c b/libdislocator/libdislocator.so.c index 1c22897c..a5f03d0c 100644 --- a/libdislocator/libdislocator.so.c +++ b/libdislocator/libdislocator.so.c @@ -501,3 +501,28 @@ __attribute__((constructor)) void __dislocator_init(void) { } +/* NetBSD fault handler specific api subset */ + +void (* esetfunc(void (*fn)(int, const char *, ...)))(int, const char *, ...) +{ + /* Might not be meaningful to implement; upper calls already report errors */ + return NULL; +} + +void *emalloc(size_t len) { + + return malloc(len); + +} + +void *ecalloc(size_t elem_len, size_t elem_cnt) { + + return calloc(elem_len, elem_cnt); + +} + +void *erealloc(void *ptr, size_t len) { + + return realloc(ptr, len); + +} -- cgit v1.2.3 From feffae60dd469b63db45a88204a1e17cc2f41bd3 Mon Sep 17 00:00:00 2001 From: Dominik Maier Date: Tue, 9 Jun 2020 03:48:50 +0200 Subject: code format --- libdislocator/libdislocator.so.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libdislocator') diff --git a/libdislocator/libdislocator.so.c b/libdislocator/libdislocator.so.c index a5f03d0c..6b1cc848 100644 --- a/libdislocator/libdislocator.so.c +++ b/libdislocator/libdislocator.so.c @@ -503,10 +503,11 @@ __attribute__((constructor)) void __dislocator_init(void) { /* NetBSD fault handler specific api subset */ -void (* esetfunc(void (*fn)(int, const char *, ...)))(int, const char *, ...) -{ +void (*esetfunc(void (*fn)(int, const char *, ...)))(int, const char *, ...) { + /* Might not be meaningful to implement; upper calls already report errors */ return NULL; + } void *emalloc(size_t len) { @@ -526,3 +527,4 @@ void *erealloc(void *ptr, size_t len) { return realloc(ptr, len); } + -- cgit v1.2.3