diff options
Diffstat (limited to 'test/libmallocintercept.c')
-rw-r--r-- | test/libmallocintercept.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/libmallocintercept.c b/test/libmallocintercept.c index 363ea95..5ed0f67 100644 --- a/test/libmallocintercept.c +++ b/test/libmallocintercept.c @@ -50,6 +50,7 @@ static void* actual_malloc(size_t size) { } static void poke_faketime(void) { +#ifdef FAIL_PRE_INIT_CALLS /* To complicate things for libfaketime, this calls clock_gettime() * while holding a lock. This should simulate problems that occurred * with address sanitizer. @@ -60,6 +61,9 @@ static void poke_faketime(void) { pthread_mutex_lock(&time_mutex); clock_gettime(CLOCK_REALTIME, ×pec); pthread_mutex_unlock(&time_mutex); +#else + print_msg("FAIL_PRE_INIT_CALLS not defined, skipping poke_faketime() "); +#endif } void *malloc(size_t size) { |