void-packages/srcpkgs/electron10/files/musl-patches/chromium-musl_cdefs.patch

46 lines
1.2 KiB
Diff

diff --git a/base/allocator/allocator_shim_internals.h b/base/allocator/allocator_shim_internal
s.h
index 0196f89..bb42b5d 100644
--- a/base/allocator/allocator_shim_internals.h
+++ b/base/allocator/allocator_shim_internals.h
@@ -7,7 +7,9 @@
#if defined(__GNUC__)
+#if defined(__GLIBC__)
#include <sys/cdefs.h> // for __THROW
+#endif
#ifndef __THROW // Not a glibc system
#ifdef _NOEXCEPT // LLVM libc++ uses noexcept instead
diff --git a/third_party/libsync/src/include/sync/sync.h b/third_party/libsync/src/include/sync/sync.h
index 50ed0ac..7552a49 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 /* __cplusplus */
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 /* __cplusplus */
#endif /* __SYS_CORE_SYNC_H */