summaryrefslogtreecommitdiffstats
path: root/main/openssh/openssh-fix-openssl-abi.diff
diff options
context:
space:
mode:
Diffstat (limited to 'main/openssh/openssh-fix-openssl-abi.diff')
-rw-r--r--main/openssh/openssh-fix-openssl-abi.diff20
1 files changed, 20 insertions, 0 deletions
diff --git a/main/openssh/openssh-fix-openssl-abi.diff b/main/openssh/openssh-fix-openssl-abi.diff
new file mode 100644
index 0000000000..2b4a4cc931
--- /dev/null
+++ b/main/openssh/openssh-fix-openssl-abi.diff
@@ -0,0 +1,20 @@
+--- openssh-5.9p1/entropy.c.orig
++++ openssh-5.9p1/entropy.c
+@@ -206,6 +206,7 @@
+ void
+ seed_rng(void)
+ {
++ u_long mask;
+ #ifndef OPENSSL_PRNG_ONLY
+ unsigned char buf[RANDOM_SEED_SIZE];
+ #endif
+@@ -213,7 +214,8 @@
+ * OpenSSL version numbers: MNNFFPPS: major minor fix patch status
+ * We match major, minor, fix and status (not patch)
+ */
+- if ((SSLeay() ^ OPENSSL_VERSION_NUMBER) & ~0xff0L)
++ mask = (OPENSSL_VERSION_NUMBER >= 0x10000000) ? 0xffff0L : 0xff0L;
++ if ((SSLeay() ^ OPENSSL_VERSION_NUMBER) & ~mask)
+ fatal("OpenSSL version mismatch. Built against %lx, you "
+ "have %lx", (u_long)OPENSSL_VERSION_NUMBER, SSLeay());
+