Guard CRT writing structure by MBEDTLS_X509_CRT_WRITE_C
diff --git a/include/mbedtls/x509_crt.h b/include/mbedtls/x509_crt.h
index f3ef572..182ab15 100644
--- a/include/mbedtls/x509_crt.h
+++ b/include/mbedtls/x509_crt.h
@@ -194,6 +194,7 @@
 #define MBEDTLS_X509_MAX_FILE_PATH_LEN 512
 #endif
 
+#if defined(MBEDTLS_X509_CRT_WRITE_C)
 /**
  * Container for writing a certificate (CRT)
  */
@@ -211,6 +212,7 @@
     mbedtls_asn1_named_data *extensions;
 }
 mbedtls_x509write_cert;
+#endif /* MBEDTLS_X509_CRT_WRITE_C */
 
 /**
  * Item in a verification chain: cert and flags for it