summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/idris-test-ffi008.patch
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2022-06-08 14:46:24 +0200
committerLudovic Courtès <ludo@gnu.org>2022-06-08 14:46:24 +0200
commit8c3e9da13a3c92a7db308db8c0d81cb474ad7799 (patch)
tree88d06952aa5cc3a9c4991d9c43eb7950ff174fe1 /gnu/packages/patches/idris-test-ffi008.patch
parent5439c04ebdb7b6405f5ea2446b375f1d155a8d95 (diff)
parent0c5299200ffcd16370f047b7ccb187c60f30da34 (diff)
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/patches/idris-test-ffi008.patch')
-rw-r--r--gnu/packages/patches/idris-test-ffi008.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/gnu/packages/patches/idris-test-ffi008.patch b/gnu/packages/patches/idris-test-ffi008.patch
new file mode 100644
index 0000000000..530813c20e
--- /dev/null
+++ b/gnu/packages/patches/idris-test-ffi008.patch
@@ -0,0 +1,26 @@
+Avoid "multiple definition of `mystruct'" error from `ld`:
+
+Submitted upstream at https://github.com/idris-lang/Idris-dev/issues/4914
+
+--- a/test/ffi008/ffi008.h 1969-12-31 18:00:01.000000000 -0600
++++ a/test/ffi008/ffi008.h 2022-04-13 00:32:35.561262598 -0500
+@@ -10,7 +10,7 @@
+ int16_t b;
+ };
+
+-struct test2 mystruct;
++extern struct test2 mystruct;
+
+ int size1(void);
+ int size2(void);
+--- a/test/ffi008/ffi008.c 1969-12-31 18:00:01.000000000 -0600
++++ a/test/ffi008/ffi008.c 2022-04-13 00:32:53.145186302 -0500
+@@ -11,6 +11,8 @@
+ return sizeof(struct test2);
+ }
+
++struct test2 mystruct;
++
+ void print_mystruct(void) {
+ printf("a: %d b: %d\n", mystruct.a, mystruct.b);
+ }