libcln: Patch to build with clang
authorFredrik Fornwall <fredrik@fornwall.net>
Sun, 15 Jan 2017 18:38:37 +0000 (19:38 +0100)
committerFredrik Fornwall <fredrik@fornwall.net>
Sun, 15 Jan 2017 18:38:37 +0000 (19:38 +0100)
packages/libcln/src-base-low-cl_low_div.cc.patch [new file with mode: 0644]
packages/libcln/src-base-low-cl_low_mul.cc.patch [new file with mode: 0644]

diff --git a/packages/libcln/src-base-low-cl_low_div.cc.patch b/packages/libcln/src-base-low-cl_low_div.cc.patch
new file mode 100644 (file)
index 0000000..fff4c49
--- /dev/null
@@ -0,0 +1,21 @@
+Fix error building with clang:
+
+base/low/cl_low_div.cc:210:8: error: declaration of 'divu_64_rest' in global scope conflicts with declaration with C language link
+age
+uint64 divu_64_rest;
+       ^
+./base/cl_low.h:982:21: note: declared with C language linkage here
+extern "C" uint64 divu_64_rest;                         // -> Rest r
+
+diff -u -r ../cln-1.3.4/src/base/low/cl_low_div.cc ./src/base/low/cl_low_div.cc
+--- ../cln-1.3.4/src/base/low/cl_low_div.cc    2011-04-08 23:07:28.000000000 +0200
++++ ./src/base/low/cl_low_div.cc       2017-01-15 18:37:40.666599325 +0100
+@@ -207,7 +207,7 @@
+ #endif
+ #ifdef NEED_VAR_divu_64_rest
+-uint64 divu_64_rest;
++extern "C" uint64 divu_64_rest;
+ #endif
+ #ifdef NEED_FUNCTION_divu_6464_6464_
diff --git a/packages/libcln/src-base-low-cl_low_mul.cc.patch b/packages/libcln/src-base-low-cl_low_mul.cc.patch
new file mode 100644 (file)
index 0000000..5b25a07
--- /dev/null
@@ -0,0 +1,17 @@
+diff -u -r ../cln-1.3.4/src/base/low/cl_low_mul.cc ./src/base/low/cl_low_mul.cc
+--- ../cln-1.3.4/src/base/low/cl_low_mul.cc    2011-04-08 23:06:30.000000000 +0200
++++ ./src/base/low/cl_low_mul.cc       2017-01-15 18:42:11.755489083 +0100
+@@ -50,11 +50,11 @@
+ #ifdef NEED_VAR_mulu64_high
+-uint64 mulu64_high;
++extern "C" uint64 mulu64_high;
+ #endif
+ #ifdef NEED_FUNCTION_mulu64_
+-uint64 mulu64_high;
++extern "C" uint64 mulu64_high;
+ namespace cln {
+ extern "C" uint64 mulu64_ (uint64 x, uint64 y);
+ uint64 mulu64_ (uint64 x, uint64 y)