Skip to content

Commit

Permalink
Fix benchmark and udp_proxy dependency on MBEDTLS_HAVE_TIME
Browse files Browse the repository at this point in the history
Signed-off-by: Andrzej Kurek <[email protected]>
  • Loading branch information
Andrzej Kurek committed Mar 4, 2022
1 parent 09e803c commit 6056e7a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 3 additions & 5 deletions programs/test/benchmark.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,17 @@
#define mbedtls_free free
#endif

#if !defined(MBEDTLS_TIMING_C)
#if !defined(MBEDTLS_HAVE_TIME)
int main( void )
{
mbedtls_printf("MBEDTLS_TIMING_C not defined.\n");
mbedtls_printf("MBEDTLS_HAVE_TIME not defined.\n");
mbedtls_exit( 0 );
}
#else

#include <string.h>
#include <stdlib.h>

#include "mbedtls/timing.h"

#include "mbedtls/md5.h"
#include "mbedtls/ripemd160.h"
#include "mbedtls/sha1.h"
Expand Down Expand Up @@ -1304,4 +1302,4 @@ int main( int argc, char *argv[] )
mbedtls_exit( 0 );
}

#endif /* MBEDTLS_TIMING_C */
#endif /* MBEDTLS_HAVE_TIME */
2 changes: 2 additions & 0 deletions programs/test/udp_proxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ int main( void )
#endif
#endif /* _MSC_VER */
#else /* ( _WIN32 || _WIN32_WCE ) && !EFIX64 && !EFI32 */
#if defined(MBEDTLS_HAVE_TIME)
#include <sys/time.h>
#endif
#include <sys/types.h>
#include <unistd.h>
#endif /* ( _WIN32 || _WIN32_WCE ) && !EFIX64 && !EFI32 */
Expand Down

0 comments on commit 6056e7a

Please sign in to comment.