Skip to content

Commit 64c918e

Browse files
committed
chromium: Fix build on musl
Add additional patch to fix warnings seen with musl builds Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 parent 9836543 commit 64c918e

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

meta-chromium/recipes-browser/chromium/chromium-gn.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ SRC_URI:append:libc-musl = "\
4949
file://musl/0020-Fix-tab-crashes-on-musl.patch \
5050
file://musl/0021-pthread_getname_np.patch \
5151
file://musl/scoped-file.patch \
52+
file://musl/fix-narrowing-cast.patch \
5253
"
5354

5455
ANY_OF_DISTRO_FEATURES = "opengl vulkan"
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
Fix additional compiler warnings
2+
3+
Fixes
4+
../../base/files/file_util_linux.cc:33:10: error: case value evaluates to -1859950530, which cannot be narrowed to type 'unsigned long' [-Wc++11-narrowing] case static_cast<int>(BTRFS_SUPER_MAGIC):
5+
^
6+
7+
Upstream-Status: Pending
8+
Signed-off-by: Khem Raj <raj.khem@gmail.com>
9+
10+
--- a/base/files/file_util_linux.cc
11+
+++ b/base/files/file_util_linux.cc
12+
@@ -30,7 +30,7 @@ bool GetFileSystemType(const FilePath& p
13+
case EXT2_SUPER_MAGIC: // Also ext3 and ext4
14+
case MSDOS_SUPER_MAGIC:
15+
case REISERFS_SUPER_MAGIC:
16+
- case static_cast<int>(BTRFS_SUPER_MAGIC):
17+
+ case static_cast<unsigned int>(BTRFS_SUPER_MAGIC):
18+
case 0x5346544E: // NTFS
19+
case 0x58465342: // XFS
20+
case 0x3153464A: // JFS
21+
@@ -40,14 +40,14 @@ bool GetFileSystemType(const FilePath& p
22+
*type = FILE_SYSTEM_NFS;
23+
break;
24+
case SMB_SUPER_MAGIC:
25+
- case static_cast<int>(0xFF534D42): // CIFS
26+
+ case static_cast<unsigned int>(0xFF534D42): // CIFS
27+
*type = FILE_SYSTEM_SMB;
28+
break;
29+
case CODA_SUPER_MAGIC:
30+
*type = FILE_SYSTEM_CODA;
31+
break;
32+
- case static_cast<int>(HUGETLBFS_MAGIC):
33+
- case static_cast<int>(RAMFS_MAGIC):
34+
+ case static_cast<unsigned int>(HUGETLBFS_MAGIC):
35+
+ case static_cast<unsigned int>(RAMFS_MAGIC):
36+
case TMPFS_MAGIC:
37+
*type = FILE_SYSTEM_MEMORY;
38+
break;
39+
--- a/base/system/sys_info_posix.cc
40+
+++ b/base/system/sys_info_posix.cc
41+
@@ -102,8 +102,8 @@ bool IsStatsZeroIfUnlimited(const base::
42+
43+
switch (stats.f_type) {
44+
case TMPFS_MAGIC:
45+
- case static_cast<int>(HUGETLBFS_MAGIC):
46+
- case static_cast<int>(RAMFS_MAGIC):
47+
+ case static_cast<unsigned int>(HUGETLBFS_MAGIC):
48+
+ case static_cast<unsigned int>(RAMFS_MAGIC):
49+
return true;
50+
}
51+
return false;

0 commit comments

Comments
 (0)