aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrent Cook <busterb@gmail.com>2019-01-20 19:58:04 -0600
committerBrent Cook <busterb@gmail.com>2019-01-20 20:03:37 -0600
commit8475a5876d3ecbbfd2a590ab6ea81e332dfb2773 (patch)
treeb5c388b408d1eaca80f7f6efa544c67ac86563b3
parent72bb1ed61834c37819c9d4fce516a0360ca0095e (diff)
downloadportable-8475a5876d3ecbbfd2a590ab6ea81e332dfb2773.tar.gz
portable-8475a5876d3ecbbfd2a590ab6ea81e332dfb2773.tar.bz2
portable-8475a5876d3ecbbfd2a590ab6ea81e332dfb2773.zip
add _LP64 checks
-rw-r--r--patches/bn_div.c.patch11
-rw-r--r--patches/bn_lcl.h.patch11
2 files changed, 22 insertions, 0 deletions
diff --git a/patches/bn_div.c.patch b/patches/bn_div.c.patch
new file mode 100644
index 0000000..9989e8d
--- /dev/null
+++ b/patches/bn_div.c.patch
@@ -0,0 +1,11 @@
1--- openbsd/src/lib/libcrypto/bn/bn_div.c 2018-08-03 22:40:06.596555542 -0500
2+++ crypto/bn/bn_div.c 2019-01-20 19:26:37.891450640 -0600
3@@ -89,7 +89,7 @@
4 q; \
5 })
6 # define REMAINDER_IS_ALREADY_CALCULATED
7-# elif defined(__x86_64)
8+# elif defined(__x86_64) && defined(_LP64)
9 /*
10 * Same story here, but it's 128-bit by 64-bit division. Wow!
11 * <appro@fy.chalmers.se>
diff --git a/patches/bn_lcl.h.patch b/patches/bn_lcl.h.patch
new file mode 100644
index 0000000..184bbd7
--- /dev/null
+++ b/patches/bn_lcl.h.patch
@@ -0,0 +1,11 @@
1--- ./openbsd/src/lib/libcrypto/bn/bn_lcl.h 2018-12-17 06:59:43.067523154 -0600
2+++ ./crypto/bn/bn_lcl.h 2019-01-20 19:43:53.679717457 -0600
3@@ -239,7 +239,7 @@
4 : "r"(a), "r"(b)); \
5 ret; })
6 # endif /* compiler */
7-# elif defined(__x86_64) || defined(__x86_64__)
8+# elif (defined(__x86_64) || defined(__x86_64__)) && defined(_LP64)
9 # if defined(__GNUC__) && __GNUC__>=2
10 # define BN_UMULT_HIGH(a,b) ({ \
11 BN_ULONG ret,discard; \