From 462906f955b2c2b825fd6e4bea26569df70a7ff0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Mon, 21 Jul 2014 17:37:01 +0200 Subject: [PATCH] Do no test net_usleep() when not defined --- ChangeLog | 2 ++ library/timing.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 51c435a24..fb3d54622 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,8 @@ Bugfix * Fix net_accept() regarding non-blocking sockets (found by Luca Pesce). * Don't print uninitialised buffer in ssl_mail_client (found by Marc Abel). * Fix warnings from Clang's scan-build (contributed by Alfred Klomp). + * Fix compile error in timing.c when POLARSSL_NET_C and POLARSSL_SELFTEST + are defined but not POLARSSL_HAVE_TIME (found by Stephane Di Vito). Changes * Ciphersuites using SHA-256 or SHA-384 now require TLS 1.x (there is no diff --git a/library/timing.c b/library/timing.c index 19ccb9a3f..94be0add0 100644 --- a/library/timing.c +++ b/library/timing.c @@ -333,7 +333,7 @@ void m_sleep( int milliseconds ) #if defined(POLARSSL_SELF_TEST) /* To test net_usleep against our functions */ -#if defined(POLARSSL_NET_C) +#if defined(POLARSSL_NET_C) && defined(POLARSSL_HAVE_TIME) #include "polarssl/net.h" #endif @@ -465,7 +465,7 @@ hard_test: if( verbose != 0 ) polarssl_printf( "passed\n" ); -#if defined(POLARSSL_NET_C) +#if defined(POLARSSL_NET_C) && defined(POLARSSL_HAVE_TIME) if( verbose != 0 ) polarssl_printf( " TIMING test #4 (net_usleep/ get_timer): " );