guard pk_error_from_psa_ecdsa with USE_PSA_CRYPTO

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
diff --git a/library/pk_wrap.c b/library/pk_wrap.c
index 2badfe7..9c6cf9c 100644
--- a/library/pk_wrap.c
+++ b/library/pk_wrap.c
@@ -147,9 +147,9 @@
             return( mbedtls_pk_error_from_psa( status ) );
     }
 }
-#endif
+#endif /* PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY */
 
-#endif
+#endif /* MBEDTLS_USE_PSA_CRYPTO */
 
 #if defined(MBEDTLS_RSA_C)
 static int rsa_can_do( mbedtls_pk_type_t type )
diff --git a/library/pk_wrap.h b/library/pk_wrap.h
index 02a636f..7375da1 100644
--- a/library/pk_wrap.h
+++ b/library/pk_wrap.h
@@ -137,15 +137,16 @@
 
 #if defined(MBEDTLS_USE_PSA_CRYPTO)
 extern const mbedtls_pk_info_t mbedtls_pk_opaque_info;
-#endif
-
-#if defined(MBEDTLS_PSA_CRYPTO_C)
-int mbedtls_pk_error_from_psa( psa_status_t status );
 
 #if defined(PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY)
 int mbedtls_pk_error_from_psa_ecdsa( psa_status_t status );
 #endif
 
+#endif
+
+#if defined(MBEDTLS_PSA_CRYPTO_C)
+int mbedtls_pk_error_from_psa( psa_status_t status );
+
 #if defined(PSA_WANT_KEY_TYPE_RSA_PUBLIC_KEY)
 int mbedtls_pk_error_from_psa_rsa( psa_status_t status );
 #endif