Deprecate using NET_C without HAVE_IPV6
diff --git a/include/polarssl/check_config.h b/include/polarssl/check_config.h
index a255874..f0d83c8 100644
--- a/include/polarssl/check_config.h
+++ b/include/polarssl/check_config.h
@@ -35,6 +35,15 @@
 #error "POLARSSL_DEPRECATED_WARNING only works with GCC and Clang"
 #endif
 
+#if defined(POLARSSL_NET_C) && !defined(POLARSSL_HAVE_IPV6)
+#if defined(POLARSSL_DEPRECATED_WARNING)
+#warning "Using POLARSSL_NET_C without POLARSSL_HAVE_IPV6 is deprecated"
+#endif
+#if defined(POLARSSL_DEPRECATED_REMOVED)
+#define POLARSSL_HAVE_IPV6
+#endif
+#endif /* POLARSSL_NET_C && !POLARSSL_HAVE_IPV6 */
+
 #if defined(POLARSSL_AESNI_C) && !defined(POLARSSL_HAVE_ASM)
 #error "POLARSSL_AESNI_C defined, but not all prerequisites"
 #endif
diff --git a/include/polarssl/config.h b/include/polarssl/config.h
index 220f74d..76972dd 100644
--- a/include/polarssl/config.h
+++ b/include/polarssl/config.h
@@ -107,6 +107,9 @@
  *
  * Note: on Windows/MingW, XP or higher is required.
  *
+ * \warning As of 1.3.11, *not* using this flag when POLARSSL_NET_C is
+ * defined, is deprecated. The alternative legacy code will be removed in 2.0.
+ *
  * Comment if your system does not support the IPv6 socket interface
  */
 #define POLARSSL_HAVE_IPV6
@@ -1757,6 +1760,9 @@
  *
  * Enable the TCP/IP networking routines.
  *
+ * \warning As of 1.3.11, it is deprecated to enable this module without
+ * POLARSSL_HAVE_IPV6. The alternative legacy code will be removed in 2.0.
+ *
  * Module:  library/net.c
  *
  * This module provides TCP/IP networking routines.