Fix compilation issue
Fix compilation error when both `MBEDTLS_ECP_RESTARTABLE` and the
alternative definition of ECDH function are defined.
diff --git a/library/ecdh.c b/library/ecdh.c
index 9fad8e1..b7e25dc 100644
--- a/library/ecdh.c
+++ b/library/ecdh.c
@@ -198,7 +198,7 @@
if( ctx == NULL || ctx->grp.pbits == 0 )
return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA );
-#if defined(MBEDTLS_ECP_RESTARTABLE)
+#if defined(MBEDTLS_ECP_RESTARTABLE) && !defined(MBEDTLS_ECDH_GEN_PUBLIC_ALT)
if( ctx->restart_enabled )
rs_ctx = &ctx->rs;
#endif
@@ -293,7 +293,7 @@
if( ctx == NULL || ctx->grp.pbits == 0 )
return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA );
-#if defined(MBEDTLS_ECP_RESTARTABLE)
+#if defined(MBEDTLS_ECP_RESTARTABLE) && !defined(MBEDTLS_ECDH_GEN_PUBLIC_ALT)
if( ctx->restart_enabled )
rs_ctx = &ctx->rs;
#endif
@@ -349,7 +349,7 @@
if( ctx == NULL || ctx->grp.pbits == 0 )
return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA );
-#if defined(MBEDTLS_ECP_RESTARTABLE)
+#if defined(MBEDTLS_ECP_RESTARTABLE) && !defined(MBEDTLS_ECDH_GEN_PUBLIC_ALT)
if( ctx->restart_enabled )
rs_ctx = &ctx->rs;
#endif