diff --git a/meta-chromium/recipes-browser/chromium/files/musl/0023-fx-non-existent-compat-headers.patch b/meta-chromium/recipes-browser/chromium/files/musl/0023-fx-non-existent-compat-headers.patch new file mode 100644 index 000000000..b2aa48ad4 --- /dev/null +++ b/meta-chromium/recipes-browser/chromium/files/musl/0023-fx-non-existent-compat-headers.patch @@ -0,0 +1,75 @@ +From 70a8d057c6318ab73cd031d874661c533d7e3b2e Mon Sep 17 00:00:00 2001 +From: "Issam E. Maghni" +Date: Sat, 30 Oct 2021 19:14:07 -0400 +Subject: [PATCH] Fix non-existent compat. headers + +musl has neither `sys/cdefs.h` nor `sys/queue.h` [1]. + +[1] https://wiki.musl-libc.org/faq.html + +Signed-off-by: Issam E. Maghni +--- + base/third_party/libevent/BUILD.gn | 2 +- + third_party/crashpad/crashpad/compat/linux/sys/ptrace.h | 2 -- + third_party/libsync/src/include/sync/sync.h | 9 ++++++--- + 3 files changed, 7 insertions(+), 6 deletions(-) + +diff --git a/base/third_party/libevent/BUILD.gn b/base/third_party/libevent/BUILD.gn +index abd3901d..ae2f020f 100644 +--- a/base/third_party/libevent/BUILD.gn ++++ b/base/third_party/libevent/BUILD.gn +@@ -49,7 +49,7 @@ static_library("libevent") { + "linux/config.h", + "linux/event-config.h", + ] +- include_dirs = [ "linux" ] ++ include_dirs = [ "linux", "compat" ] + } else if (is_android) { + sources += [ + "android/config.h", +diff --git a/third_party/crashpad/crashpad/compat/linux/sys/ptrace.h b/third_party/crashpad/crashpad/compat/linux/sys/ptrace.h +index f8be372c..c07e4c88 100644 +--- a/third_party/crashpad/crashpad/compat/linux/sys/ptrace.h ++++ b/third_party/crashpad/crashpad/compat/linux/sys/ptrace.h +@@ -17,8 +17,6 @@ + + #include_next + +-#include +- + // https://sourceware.org/bugzilla/show_bug.cgi?id=22433 + #if !defined(PTRACE_GET_THREAD_AREA) && !defined(PT_GET_THREAD_AREA) && \ + defined(__GLIBC__) +diff --git a/third_party/libsync/src/include/sync/sync.h b/third_party/libsync/src/include/sync/sync.h +index 50ed0ac5..014ea72d 100644 +--- a/third_party/libsync/src/include/sync/sync.h ++++ b/third_party/libsync/src/include/sync/sync.h +@@ -19,12 +19,13 @@ + #ifndef __SYS_CORE_SYNC_H + #define __SYS_CORE_SYNC_H + +-#include + #include + + #include + +-__BEGIN_DECLS ++#ifdef __cplusplus ++extern "C" { ++#endif + + struct sync_legacy_merge_data { + int32_t fd2; +@@ -158,6 +159,8 @@ struct sync_pt_info *sync_pt_info(struct sync_fence_info_data *info, + struct sync_pt_info *itr); + void sync_fence_info_free(struct sync_fence_info_data *info); + +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif + + #endif /* __SYS_CORE_SYNC_H */ +-- +2.31.1 + diff --git a/meta-chromium/recipes-browser/chromium/files/musl/0024-no-canonicalize_file_name-in-musl.patch b/meta-chromium/recipes-browser/chromium/files/musl/0024-no-canonicalize_file_name-in-musl.patch new file mode 100644 index 000000000..636fbb18f --- /dev/null +++ b/meta-chromium/recipes-browser/chromium/files/musl/0024-no-canonicalize_file_name-in-musl.patch @@ -0,0 +1,26 @@ +From ad9541cd3c88b39efa47912af2dd939e955b1841 Mon Sep 17 00:00:00 2001 +From: "Issam E. Maghni" +Date: Sat, 30 Oct 2021 19:19:44 -0400 +Subject: [PATCH] musl does not have canonicalize_file_name + +Signed-off-by: Issam E. Maghni +--- + third_party/nasm/config/config-linux.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/third_party/nasm/config/config-linux.h b/third_party/nasm/config/config-linux.h +index 9e59df4f..b96673ac 100644 +--- a/third_party/nasm/config/config-linux.h ++++ b/third_party/nasm/config/config-linux.h +@@ -139,7 +139,7 @@ + #define HAVE_ACCESS 1 + + /* Define to 1 if you have the `canonicalize_file_name' function. */ +-#define HAVE_CANONICALIZE_FILE_NAME 1 ++/* #undef HAVE_CANONICALIZE_FILE_NAME */ + + /* Define to 1 if you have the `cpu_to_le16' intrinsic function. */ + /* #undef HAVE_CPU_TO_LE16 */ +-- +2.31.1 +