|
| 1 | +From 70a8d057c6318ab73cd031d874661c533d7e3b2e Mon Sep 17 00:00:00 2001 |
| 2 | +From: "Issam E. Maghni" < [email protected]> |
| 3 | +Date: Sat, 30 Oct 2021 19:14:07 -0400 |
| 4 | +Subject: [PATCH] Fix non-existent compat. headers |
| 5 | + |
| 6 | +musl have neither `sys/cdefs.h` nor `sys/queue.h` [1]. |
| 7 | + |
| 8 | +[1] https://wiki.musl-libc.org/faq.html |
| 9 | + |
| 10 | +Signed-off-by: Issam E. Maghni < [email protected]> |
| 11 | +--- |
| 12 | + base/third_party/libevent/BUILD.gn | 2 +- |
| 13 | + third_party/crashpad/crashpad/compat/linux/sys/ptrace.h | 2 -- |
| 14 | + third_party/libsync/src/include/sync/sync.h | 9 ++++++--- |
| 15 | + 3 files changed, 7 insertions(+), 6 deletions(-) |
| 16 | + |
| 17 | +diff --git a/base/third_party/libevent/BUILD.gn b/base/third_party/libevent/BUILD.gn |
| 18 | +index abd3901d..ae2f020f 100644 |
| 19 | +--- a/base/third_party/libevent/BUILD.gn |
| 20 | ++++ b/base/third_party/libevent/BUILD.gn |
| 21 | +@@ -49,7 +49,7 @@ static_library("libevent") { |
| 22 | + "linux/config.h", |
| 23 | + "linux/event-config.h", |
| 24 | + ] |
| 25 | +- include_dirs = [ "linux" ] |
| 26 | ++ include_dirs = [ "linux", "compat" ] |
| 27 | + } else if (is_android) { |
| 28 | + sources += [ |
| 29 | + "android/config.h", |
| 30 | +diff --git a/third_party/crashpad/crashpad/compat/linux/sys/ptrace.h b/third_party/crashpad/crashpad/compat/linux/sys/ptrace.h |
| 31 | +index f8be372c..c07e4c88 100644 |
| 32 | +--- a/third_party/crashpad/crashpad/compat/linux/sys/ptrace.h |
| 33 | ++++ b/third_party/crashpad/crashpad/compat/linux/sys/ptrace.h |
| 34 | +@@ -17,8 +17,6 @@ |
| 35 | + |
| 36 | + #include_next <sys/ptrace.h> |
| 37 | + |
| 38 | +-#include <sys/cdefs.h> |
| 39 | +- |
| 40 | + // https://sourceware.org/bugzilla/show_bug.cgi?id=22433 |
| 41 | + #if !defined(PTRACE_GET_THREAD_AREA) && !defined(PT_GET_THREAD_AREA) && \ |
| 42 | + defined(__GLIBC__) |
| 43 | +diff --git a/third_party/libsync/src/include/sync/sync.h b/third_party/libsync/src/include/sync/sync.h |
| 44 | +index 50ed0ac5..014ea72d 100644 |
| 45 | +--- a/third_party/libsync/src/include/sync/sync.h |
| 46 | ++++ b/third_party/libsync/src/include/sync/sync.h |
| 47 | +@@ -19,12 +19,13 @@ |
| 48 | + #ifndef __SYS_CORE_SYNC_H |
| 49 | + #define __SYS_CORE_SYNC_H |
| 50 | + |
| 51 | +-#include <sys/cdefs.h> |
| 52 | + #include <stdint.h> |
| 53 | + |
| 54 | + #include <linux/types.h> |
| 55 | + |
| 56 | +-__BEGIN_DECLS |
| 57 | ++#ifdef __cplusplus |
| 58 | ++extern "C" { |
| 59 | ++#endif |
| 60 | + |
| 61 | + struct sync_legacy_merge_data { |
| 62 | + int32_t fd2; |
| 63 | +@@ -158,6 +159,8 @@ struct sync_pt_info *sync_pt_info(struct sync_fence_info_data *info, |
| 64 | + struct sync_pt_info *itr); |
| 65 | + void sync_fence_info_free(struct sync_fence_info_data *info); |
| 66 | + |
| 67 | +-__END_DECLS |
| 68 | ++#ifdef __cplusplus |
| 69 | ++} |
| 70 | ++#endif |
| 71 | + |
| 72 | + #endif /* __SYS_CORE_SYNC_H */ |
| 73 | +-- |
| 74 | +2.31.1 |
| 75 | + |
0 commit comments