Source: node-stringprep
Version: 0.8.0-3
Tags: patch buster sid

Hi Jonas

While rebuilding node-stringprep for the nodejs-abi-57 in Ubuntu, it FTBFS with a recent version of GCC. I found a pull request against upstream's github which fixed the build and I have attached it here.

According to reproducible builds' logs [1], node-stringprep hasn't failed for this reason yet, but it hasn't be tried since 2018-02-20. It is failing in Buster for a different reason though.

Regards
Graham


[1] https://tests.reproducible-builds.org/debian/history/amd64/node-stringprep.html
Description: Fixed compilation errors by adding casts
Forwarded: https://github.com/astro/node-stringprep/pull/96/commits/fa08ad0da41bfc11e82b703c4ba26fee9481591f
Author: James Bunton <jbun...@atlassian.com>
Last-Update: 2017-09-04

--- a/node-stringprep.cc
+++ b/node-stringprep.cc
@@ -119,7 +119,7 @@
         error = U_ZERO_ERROR;
         dest = new UChar[destLen];
         size_t w = usprep_prepare(profile,
-                                  *str, str.length(),
+                                  (const UChar*)*str, str.length(),
                                   dest, destLen,
                                   USPREP_DEFAULT, NULL, &error);
 
@@ -141,7 +141,7 @@
           destLen = w;
       }
 
-    Local<Value> result = Nan::New<String>(dest, destLen).ToLocalChecked();
+    Local<Value> result = Nan::New<String>((uint16_t*)dest, destLen).ToLocalChecked();
     delete[] dest;
     return scope.Escape(result);
   }
@@ -212,7 +212,7 @@
         UIDNAInfo uinfo = UIDNA_INFO_INITIALIZER;
         size_t w = uidna_nameToUnicode(
           uidna,
-          *str, str.length(),
+          (const UChar*)*str, str.length(),
           dest, destLen,
           &uinfo, &error);
         
@@ -235,7 +235,7 @@
           destLen = w;
       }
 
-    Local<String> result = Nan::New<String>(dest, destLen).ToLocalChecked();
+    Local<String> result = Nan::New<String>((uint16_t*)dest, destLen).ToLocalChecked();
     delete[] dest;
     uidna_close(uidna);
     info.GetReturnValue().Set(result);
@@ -266,7 +266,7 @@
     UIDNAInfo uinfo1 = UIDNA_INFO_INITIALIZER;
     size_t destLen = uidna_nameToASCII(
       uidna,
-      *str, strLen,
+      (const UChar*)*str, strLen,
       NULL, 0,
       &uinfo1, &error);
     UChar *dest = NULL;
@@ -278,7 +278,7 @@
         UIDNAInfo uinfo2 = UIDNA_INFO_INITIALIZER;
         uidna_nameToASCII(
           uidna,
-          *str, strLen,
+          (const UChar*)*str, strLen,
           dest, destLen,
           &uinfo2, &error);
         if (U_SUCCESS(error) && uinfo2.errors > 0)
@@ -295,7 +295,7 @@
         return;
       }
 
-    Local<String> result = Nan::New<String>(dest, destLen).ToLocalChecked();
+    Local<String> result = Nan::New<String>((uint16_t*)dest, destLen).ToLocalChecked();
     delete[] dest;
     uidna_close(uidna);
     info.GetReturnValue().Set(result);

Reply via email to