]> code.ossystems Code Review - openembedded-core.git/commitdiff
nss: Fix build on mips/clang
authorKhem Raj <raj.khem@gmail.com>
Fri, 15 Jul 2016 10:03:25 +0000 (03:03 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 20 Jul 2016 09:24:54 +0000 (10:24 +0100)
This issue is also reported here
https://trac.macports.org/ticket/51709
Patch is also from same ticket

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-support/nss/nss/pqg.c-ULL_addend.patch [new file with mode: 0644]
meta/recipes-support/nss/nss_3.24.bb

diff --git a/meta/recipes-support/nss/nss/pqg.c-ULL_addend.patch b/meta/recipes-support/nss/nss/pqg.c-ULL_addend.patch
new file mode 100644 (file)
index 0000000..9caaaeb
--- /dev/null
@@ -0,0 +1,23 @@
+nss does not build on mips with clang because wrong types are used?
+
+pqg.c:339:16: error: comparison of constant 18446744073709551615 with expression of type 'unsigned long' is always true [-Werror,-Wtautological-constant-out-of-range-compare]
+     if (addend < MP_DIGIT_MAX) {
+       ~~~~~~ ^ ~~~~~~~~~~~~
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+Index: nss-3.24/nss/lib/freebl/pqg.c
+===================================================================
+--- nss-3.24.orig/nss/lib/freebl/pqg.c
++++ nss-3.24/nss/lib/freebl/pqg.c
+@@ -322,8 +322,8 @@ generate_h_candidate(SECItem *hit, mp_in
+ static SECStatus
+ addToSeed(const SECItem * seed,
+-          unsigned long   addend,
+-          int             seedlen, /* g in 186-1 */
++          unsigned long long  addend,
++          int                 seedlen, /* g in 186-1 */
+           SECItem * seedout)
+ {
+     mp_int s, sum, modulus, tmp;
index caed7fa894e7c87f3d8c9dea1b4ba1a3222e73bc..c7c9fab2afab2600f6db2a0c682745ebc351a487 100644 (file)
@@ -21,6 +21,7 @@ SRC_URI = "\
     file://nss-fix-incorrect-shebang-of-perl.patch \
     file://nss-fix-nsinstall-build.patch \
     file://disable-Wvarargs-with-clang.patch \
+    file://pqg.c-ULL_addend.patch \
     file://nss.pc.in \
     file://signlibs.sh \
 "