From c22602160072638e0b84157757bb8ab2f982acb4 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Tue, 15 Nov 2011 22:07:05 +0100 Subject: uclibc: Make the oomsimulator compile with uclibc In the infinite wisdom uclibc defines __GLIBC__ but is not a full drop-in replacement for the GLIBC. Check for !UCLIBC. Make sure there is a disableHooks in case the GLIBC code is not compiled Change-Id: I246d3ee7c1d3f48f7f6445daa01a4f001b9a3cb0 Reviewed-by: Harald Fernengel --- .../auto/integrationtests/exceptionsafety_objects/oomsimulator.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/auto/integrationtests/exceptionsafety_objects/oomsimulator.h b/tests/auto/integrationtests/exceptionsafety_objects/oomsimulator.h index f2db6949cc..15500f590b 100644 --- a/tests/auto/integrationtests/exceptionsafety_objects/oomsimulator.h +++ b/tests/auto/integrationtests/exceptionsafety_objects/oomsimulator.h @@ -59,7 +59,7 @@ static void my_terminate_handler() exit(1); } -#ifdef __GLIBC__ +#if defined(__GLIBC__) && !defined(__UCLIBC__) /* Use glibc's memory allocation hooks */ // From glibc 2.14, the malloc hook variables are declared volatile. @@ -195,6 +195,12 @@ static struct QCrtDebugRegistrator } crtDebugRegistrator; +#else + +static void disableHooks() +{ +} + #endif struct AllocFailer -- cgit v1.2.3