Fix compilation failure for some tool chains
authorMatt Caswell <matt@openssl.org>
Tue, 2 Jun 2015 19:18:05 +0000 (20:18 +0100)
committerMatt Caswell <matt@openssl.org>
Tue, 2 Jun 2015 22:38:03 +0000 (23:38 +0100)
Some tool chains (e.g. android) do not define IP_PMTUDISC_PROBE, and so
this build breaks.

Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit 133dce447b259e0bb93076bf5fd0ce475d16910a)

crypto/bio/bss_dgram.c

index 6493a38c08a064dec1abdec4a5218f684eab6929..7fcd831da06bed5ac36acbdac64debd4c6220d0e 100644 (file)
@@ -897,7 +897,7 @@ static long dgram_ctrl(BIO *b, int cmd, long num, void *ptr)
                 perror("setsockopt");
                 ret = -1;
             }
-# elif defined(OPENSSL_SYS_LINUX) && defined(IP_MTU_DISCOVER)
+# elif defined(OPENSSL_SYS_LINUX) && defined(IP_MTU_DISCOVER) && defined (IP_PMTUDISC_PROBE)
             if ((sockopt_val = num ? IP_PMTUDISC_PROBE : IP_PMTUDISC_DONT),
                 (ret = setsockopt(b->num, IPPROTO_IP, IP_MTU_DISCOVER,
                                   &sockopt_val, sizeof(sockopt_val))) < 0) {