From 513b2e34789b1125d44105aaadab8a3ae3493c5b Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Wed, 31 Jul 2019 09:43:20 +0200 Subject: pseudotalloc: Simplistic wrapper of talloc_named() The pseudotalloc layer doesn't yet support talloc_named() API which will be used by the upcoming "context" change. Let's add this function to pseudotalloc.c for our arm-non-eabi builds. Change-Id: I4d91ebd73a3357a17ef9143a1b41b90186d4c128 --- src/pseudotalloc/pseudotalloc.c | 5 +++++ src/pseudotalloc/talloc.h | 1 + 2 files changed, 6 insertions(+) (limited to 'src/pseudotalloc') diff --git a/src/pseudotalloc/pseudotalloc.c b/src/pseudotalloc/pseudotalloc.c index c368296c..25425e57 100644 --- a/src/pseudotalloc/pseudotalloc.c +++ b/src/pseudotalloc/pseudotalloc.c @@ -46,6 +46,11 @@ void *talloc_named_const(const void *context, size_t size, const char *name) return pseudotalloc_malloc(size); } +void *talloc_named(const void *context, size_t size, const char *fmt, ...) +{ + return pseudotalloc_malloc(size); +} + void talloc_set_name_const(const void *ptr, const char *name) { } diff --git a/src/pseudotalloc/talloc.h b/src/pseudotalloc/talloc.h index fe2efbcf..d257a981 100644 --- a/src/pseudotalloc/talloc.h +++ b/src/pseudotalloc/talloc.h @@ -48,6 +48,7 @@ int _talloc_free(void *ptr, const char *location); #define talloc(ctx, type) (type *)talloc_named_const(ctx, sizeof(type), #type) #define talloc_size(ctx, size) talloc_named_const(ctx, size, __location__) void *talloc_named_const(const void *context, size_t size, const char *name); +void *talloc_named(const void *context, size_t size, const char *fmt, ...); void talloc_set_name_const(const void *ptr, const char *name); char *talloc_strdup(const void *t, const char *p); void *talloc_pool(const void *context, size_t size); -- cgit v1.2.3