diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2017-09-20 16:06:07 +0100 |
---|---|---|
committer | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2017-09-27 12:21:25 +0000 |
commit | 76f19157a2a9313e1c8482388d5fe3553eb404dc (patch) | |
tree | ac3f8bfd96eb99a19e43ff4fdfe8addbb2b18d0a /buildstream/_fuse | |
parent | bf0f2863e8cea73e41d5d9efca3126e4075fc3ae (diff) | |
download | buildstream-76f19157a2a9313e1c8482388d5fe3553eb404dc.tar.gz |
fuse.py: Add support for Linux on ppc64
This is equivalent to this upstream pull request:
https://github.com/terencehonles/fusepy/pull/72
It is needed for BuildStream to work on ppc64 architectures. Without this
fix, the FUSE safe-hardlinks filesystem returns garbage. One visible effect
is that running integration commands fails with "executable format error"
(due to the filesystem returning garbage in place of the actual binary).
https://gitlab.com/BuildStream/buildstream/issues/83
Diffstat (limited to 'buildstream/_fuse')
-rw-r--r-- | buildstream/_fuse/fuse.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/buildstream/_fuse/fuse.py b/buildstream/_fuse/fuse.py index b53cf0a5a..f0ad96fba 100644 --- a/buildstream/_fuse/fuse.py +++ b/buildstream/_fuse/fuse.py @@ -215,6 +215,22 @@ elif _system == 'Linux': ('st_atimespec', c_timespec), ('st_mtimespec', c_timespec), ('st_ctimespec', c_timespec)] + elif _machine == 'ppc64' or _machine == 'ppc64le': + c_stat._fields_ = [ + ('st_dev', c_dev_t), + ('st_ino', c_ulong), + ('st_nlink', c_ulong), + ('st_mode', c_mode_t), + ('st_uid', c_uid_t), + ('st_gid', c_gid_t), + ('__pad', c_uint), + ('st_rdev', c_dev_t), + ('st_size', c_off_t), + ('st_blksize', c_long), + ('st_blocks', c_long), + ('st_atimespec', c_timespec), + ('st_mtimespec', c_timespec), + ('st_ctimespec', c_timespec)] elif _machine == 'aarch64': c_stat._fields_ = [ ('st_dev', c_dev_t), |