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 <harald.fernengel@nokia.com>
bb10
Holger Hans Peter Freyther 2011-11-15 22:07:05 +01:00 committed by Qt by Nokia
parent ece8f9cd51
commit c226021600
1 changed files with 7 additions and 1 deletions

View File

@ -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