summaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2020-10-17 08:08:53 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2020-10-17 12:25:09 +0200
commit5de43791b770f072f2bed0b3faa59ef06f96ff9d (patch)
tree04bdde76a31dbcfd99a0fdfa3ad7d431d375f8a6 /target
parent15b8c2e42be0d8df9e1fe159e8afffaf2f0035ac (diff)
linux: hack to cross-compile on Darwin
Diffstat (limited to 'target')
-rw-r--r--target/linux/patches/4.19.151/vdso2.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/target/linux/patches/4.19.151/vdso2.patch b/target/linux/patches/4.19.151/vdso2.patch
new file mode 100644
index 000000000..3d9d47ede
--- /dev/null
+++ b/target/linux/patches/4.19.151/vdso2.patch
@@ -0,0 +1,24 @@
+diff -Nur linux-4.19.151.orig/arch/x86/entry/vdso/vdso2c.c linux-4.19.151/arch/x86/entry/vdso/vdso2c.c
+--- linux-4.19.151.orig/arch/x86/entry/vdso/vdso2c.c 2020-10-14 10:31:27.000000000 +0200
++++ linux-4.19.151/arch/x86/entry/vdso/vdso2c.c 2020-10-17 06:09:50.000000000 +0200
+@@ -64,8 +64,20 @@
+ #include <tools/le_byteshift.h>
+
+ #include <linux/elf.h>
++#ifdef __linux__
+ #include <linux/types.h>
+ #include <linux/kernel.h>
++#else
++
++#define __must_be_array(a) 0
++#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
++
++typedef _Bool bool;
++enum {
++ false = 0,
++ true = 1
++};
++#endif
+
+ const char *outfilename;
+