Skip to content

Commit d813ff2

Browse files
krajotavio
authored andcommitted
chromium: Fix build for 32bit arm
This fixes a build error on 32bit machines ( beaglebone ) Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 parent 6079a8b commit d813ff2

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-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
@@ -46,6 +46,7 @@ SRC_URI:append:libc-musl = "\
4646
file://musl/scoped-file.patch \
4747
file://musl/fix-narrowing-cast.patch \
4848
file://musl/credentials-header.patch \
49+
file://musl/fstatat64.patch \
4950
"
5051

5152
ANY_OF_DISTRO_FEATURES = "opengl vulkan"
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
Undefine fstatat64 on musl before calling fstatat64 syscall
2+
3+
Fixes
4+
5+
In file included from ../../base/rand_util_posix.cc:21:
6+
../../third_party/lss/linux_syscall_support.h:4547:16: error: use of undeclared identifier '__NR_fstatat'; did you mean 'sys_fstatat'?
7+
LSS_INLINE _syscall4(int, fstatat64, int, d,
8+
^
9+
../../third_party/lss/linux_syscall_support.h:2671:9: note: expanded from macro '_syscall4'
10+
LSS_BODY(type, name, "r"(__r0), "r"(__r1), "r"(__r2), "r"(__r3)); \
11+
^
12+
../../third_party/lss/linux_syscall_support.h:2640:39: note: expanded from macro 'LSS_BODY'
13+
: "i"(__NR_##name) , ## args \
14+
^
15+
<scratch space>:222:1: note: expanded from here
16+
__NR_fstatat
17+
^
18+
../../third_party/lss/linux_syscall_support.h:4547:16: note: 'sys_fstatat' declared here
19+
../../third_party/lss/linux_syscall_support.h:2668:12: note: expanded from macro '_syscall4'
20+
type LSS_NAME(name)(type1 arg1, type2 arg2, type3 arg3, type4 arg4) { \
21+
^ ../../third_party/lss/linux_syscall_support.h:1901:28: note: expanded from macro 'LSS_NAME'
22+
#define LSS_NAME(name) sys_##name
23+
^
24+
<scratch space>:213:1: note: expanded from here
25+
sys_fstatat
26+
^
27+
28+
Upstream-Status: Inappropriate [musl specific]
29+
Signed-off-by: Khem Raj <raj.khem@gmail.com>
30+
31+
--- a/third_party/lss/linux_syscall_support.h
32+
+++ b/third_party/lss/linux_syscall_support.h
33+
@@ -4544,9 +4544,13 @@ struct kernel_statfs {
34+
}
35+
#endif
36+
#if defined(__NR_fstatat64)
37+
+ // musl does #define fstatat64 fstatat
38+
+ #undef fstatat64
39+
LSS_INLINE _syscall4(int, fstatat64, int, d,
40+
const char *, p,
41+
struct kernel_stat64 *, b, int, f)
42+
+ // set it back like it was
43+
+ #define fstatat64 fstatat
44+
#endif
45+
#if defined(__NR_waitpid)
46+
// waitpid is polyfilled below when not available.

0 commit comments

Comments
 (0)