Fix build with IPV6 and DTLS disabled
AxelLin opened this issue · comments
Axel Lin commented
The Anjay-esp32-client will hit build error if disable IPV6 or DTLS.
Suggest adding below ifdef to allow build without IPV6 or DTLS.
diff --git a/main/anjay-config/avsystem/commons/avs_commons_config.h b/main/anjay-config/avsystem/commons/avs_commons_config.h
index 7d762da..004ea91 100644
--- a/main/anjay-config/avsystem/commons/avs_commons_config.h
+++ b/main/anjay-config/avsystem/commons/avs_commons_config.h
@@ -255,7 +255,9 @@
* TinyDTLS support is only rudimentary.
*/
/**@{*/
+#if CONFIG_MBEDTLS_SSL_PROTO_DTLS
#define AVS_COMMONS_WITH_MBEDTLS
+#endif
/* #undef AVS_COMMONS_WITH_OPENSSL */
/* #undef AVS_COMMONS_WITH_TINYDTLS */
@@ -529,7 +531,9 @@
* At least one of AVS_COMMONS_NET_WITH_IPV4 and AVS_COMMONS_NET_WITH_IPV6
* MUST be defined if avs_net is enabled.
*/
+#if CONFIG_LWIP_IPV6
#define AVS_COMMONS_NET_WITH_IPV6
+#endif
/**
* If the TLS backend is set to OpenSSL, enables support for DTLS.
Mieszko Mieruński commented
Hi
Could you please open a PR?