[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix musl chromium build #580

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix musl chromium build
Fixes #578
  • Loading branch information
concatime committed Jul 3, 2022
commit 995bc4eeb90dadbdc1bc013e62a9d6e8962789df
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
From 70a8d057c6318ab73cd031d874661c533d7e3b2e Mon Sep 17 00:00:00 2001
From: "Issam E. Maghni" <issam.e.maghni@mailbox.org>
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 <issam.e.maghni@mailbox.org>
---
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 <sys/ptrace.h>

-#include <sys/cdefs.h>
-
// 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 <sys/cdefs.h>
#include <stdint.h>

#include <linux/types.h>

-__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

Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From ad9541cd3c88b39efa47912af2dd939e955b1841 Mon Sep 17 00:00:00 2001
From: "Issam E. Maghni" <issam.e.maghni@mailbox.org>
Date: Sat, 30 Oct 2021 19:19:44 -0400
Subject: [PATCH] musl does not have canonicalize_file_name

Signed-off-by: Issam E. Maghni <issam.e.maghni@mailbox.org>
---
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