mirror of
https://github.com/void-linux/void-packages.git
synced 2025-04-16 14:17:02 +02:00
electron19: fix build
This commit is contained in:
parent
e6a7d5ac3e
commit
5dec636c8a
2 changed files with 61 additions and 0 deletions
11
srcpkgs/electron19/patches/python-3.11.patch
Normal file
11
srcpkgs/electron19/patches/python-3.11.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- a/src/tools/grit/grit/util.py 2022-06-14 05:15:31.000000000 -0400
|
||||
+++ b/src/tools/grit/grit/util.py 2023-04-10 09:06:50.593197014 -0400
|
||||
@@ -209,7 +209,7 @@
|
||||
mode = 'rb'
|
||||
encoding = None
|
||||
else:
|
||||
- mode = 'rU'
|
||||
+ mode = 'r'
|
||||
|
||||
with io.open(filename, mode, encoding=encoding) as f:
|
||||
return f.read()
|
|
@ -0,0 +1,50 @@
|
|||
From 7d1394bd639e3bcf68082ac3fc33eeed6a00d2e6 Mon Sep 17 00:00:00 2001
|
||||
From: Elly Fong-Jones <ellyjones@chromium.org>
|
||||
Date: Thu, 2 Mar 2023 00:15:11 +0000
|
||||
Subject: [PATCH] sql: relax constraints on VirtualCursor layout
|
||||
|
||||
VirtualCursor::FromSqliteCursor required that VirtualCursor had a
|
||||
standard layout, but in fact VirtualCursor shouldn't have a standard
|
||||
layout, and the fact that it does with libc++ is a deviation from the
|
||||
C++ standard. This change:
|
||||
|
||||
1. Relaxes the requirement that VirtualCursor has a standard layout, and
|
||||
2. Relaxes the requirement that the sqlite_cursor_ field has to be at
|
||||
offset 0
|
||||
|
||||
by use of offsetof() and pointer subtraction. This change both improves
|
||||
standards compliance and makes this code build with libstdc++.
|
||||
|
||||
Bug: 1380656
|
||||
Change-Id: I9c47abd9197b187da0360ca5619ccf7dadab4f33
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4292313
|
||||
Reviewed-by: Austin Sullivan <asully@chromium.org>
|
||||
Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1111925}
|
||||
---
|
||||
sql/recover_module/cursor.h | 10 ++++------
|
||||
1 file changed, 4 insertions(+), 6 deletions(-)
|
||||
|
||||
Copied from void chromium patches
|
||||
|
||||
diff --git a/sql/recover_module/cursor.h b/sql/recover_module/cursor.h
|
||||
index 1970bdca8c6..4cb06557009 100644
|
||||
--- a/src/sql/recover_module/cursor.h
|
||||
+++ b/src/sql/recover_module/cursor.h
|
||||
@@ -63,12 +63,10 @@ class VirtualCursor {
|
||||
// |sqlite_cursor| must have been returned by VirtualTable::SqliteCursor().
|
||||
static inline VirtualCursor* FromSqliteCursor(
|
||||
sqlite3_vtab_cursor* sqlite_cursor) {
|
||||
- static_assert(std::is_standard_layout<VirtualCursor>::value,
|
||||
- "needed for the reinterpret_cast below");
|
||||
- static_assert(offsetof(VirtualCursor, sqlite_cursor_) == 0,
|
||||
- "sqlite_cursor_ must be the first member of the class");
|
||||
- VirtualCursor* result = reinterpret_cast<VirtualCursor*>(sqlite_cursor);
|
||||
- DCHECK_EQ(sqlite_cursor, &result->sqlite_cursor_);
|
||||
+ VirtualCursor* result = reinterpret_cast<VirtualCursor*>(
|
||||
+ (reinterpret_cast<char*>(sqlite_cursor) -
|
||||
+ offsetof(VirtualCursor, sqlite_cursor_)));
|
||||
+ CHECK_EQ(sqlite_cursor, &result->sqlite_cursor_);
|
||||
return result;
|
||||
}
|
||||
|
Loading…
Add table
Reference in a new issue