From 25957ab6455d68575a5851e8784cf4e490966e4c Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 5 Dec 2013 08:36:13 +0100 Subject: [PATCH] talloc: check for TALLOC_GET_TYPE_ABORT_NOOP Signed-off-by: Stefan Metzmacher --- lib/talloc/talloc.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/talloc/talloc.h b/lib/talloc/talloc.h index 0d47d23b2ff5..5ece54ddaa42 100644 --- a/lib/talloc/talloc.h +++ b/lib/talloc/talloc.h @@ -761,7 +761,11 @@ type *talloc_get_type(const void *ptr, #type); */ void *talloc_get_type_abort(const void *ptr, #type); #else +#ifdef TALLOC_GET_TYPE_ABORT_NOOP +#define talloc_get_type_abort(ptr, type) (type *)(ptr) +#else #define talloc_get_type_abort(ptr, type) (type *)_talloc_get_type_abort(ptr, #type, __location__) +#endif void *_talloc_get_type_abort(const void *ptr, const char *name, const char *location); #endif -- 2.34.1