diff --git a/src/openvpn/ssl_mbedtls.c b/src/openvpn/ssl_mbedtls.c
index 1853335e..a2ed59ac 100644
--- a/src/openvpn/ssl_mbedtls.c
+++ b/src/openvpn/ssl_mbedtls.c
@@ -66,8 +66,13 @@
  * Compatibility: mbedtls_ctr_drbg_update was deprecated in mbedtls 2.16 and
  * replaced with mbedtls_ctr_drbg_update_ret, which returns an error code.
  * For older versions, we call mbedtls_ctr_drbg_update and return 0 (success).
+ *
+ * Note: mbedtls_ctr_drbg_update_ret was backported to the mbedtls 2.14 branch
+ * since 2.14.1. For this reason, the definition of this function has to be
+ * excluded for any mbedtls going from 2.14.1 (included) to 2.15 (excluded)
  */
-#if MBEDTLS_VERSION_NUMBER < 0x02100000
+#if MBEDTLS_VERSION_NUMBER < 0x02100000 && \
+	!(MBEDTLS_VERSION_NUMBER > 0x020E0000 && MBEDTLS_VERSION_NUMBER < 0x020F0000)
 static int mbedtls_ctr_drbg_update_ret(mbedtls_ctr_drbg_context *ctx,
                                        const unsigned char *additional,
                                        size_t add_len)
