net.c now depends on select() unconditionally
diff --git a/library/net.c b/library/net.c
index a372134..568a244 100644
--- a/library/net.c
+++ b/library/net.c
@@ -65,9 +65,7 @@
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
-#if defined(MBEDTLS_HAVE_TIME)
#include <sys/time.h>
-#endif
#include <unistd.h>
#include <signal.h>
#include <fcntl.h>
@@ -84,9 +82,7 @@
#define snprintf _snprintf
#endif
-#if defined(MBEDTLS_HAVE_TIME)
#include <time.h>
-#endif
#if defined(_MSC_VER) && !defined(EFIX64) && !defined(EFI32)
#include <basetsd.h>
@@ -396,7 +392,6 @@
#endif
}
-#if defined(MBEDTLS_HAVE_TIME)
/*
* Portable usleep helper
*/
@@ -412,7 +407,6 @@
#endif
select( 0, NULL, NULL, NULL, &tv );
}
-#endif /* MBEDTLS_HAVE_TIME */
/*
* Read at most 'len' characters
@@ -445,7 +439,6 @@
return( ret );
}
-#if defined(MBEDTLS_HAVE_TIME)
/*
* Read at most 'len' characters, blocking for at most 'timeout' ms
*/
@@ -486,7 +479,6 @@
/* This call will not block */
return( mbedtls_net_recv( ctx, buf, len ) );
}
-#endif /* MBEDTLS_HAVE_TIME */
/*
* Write at most 'len' characters
diff --git a/library/timing.c b/library/timing.c
index e83b74e..4ff11e7 100644
--- a/library/timing.c
+++ b/library/timing.c
@@ -352,7 +352,7 @@
#if defined(MBEDTLS_SELF_TEST)
/* To test mbedtls_net_usleep against our functions */
-#if defined(MBEDTLS_NET_C) && defined(MBEDTLS_HAVE_TIME)
+#if defined(MBEDTLS_NET_C)
#include "mbedtls/net.h"
#endif
@@ -507,7 +507,7 @@
if( verbose != 0 )
mbedtls_printf( "passed\n" );
-#if defined(MBEDTLS_NET_C) && defined(MBEDTLS_HAVE_TIME)
+#if defined(MBEDTLS_NET_C)
if( verbose != 0 )
mbedtls_printf( " TIMING test #4 (net_usleep/ get_timer): " );