summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2017-09-20 16:06:07 +0100
committerSam Thursfield <sam.thursfield@codethink.co.uk>2017-09-20 17:13:47 +0100
commitb049630a006d96a2549a67ca7fac63d3ac723d29 (patch)
tree205ea16e04fd3cfab1220adae78e124c7be59141
parent9c83378250ecc6c62b5c32909640d64fd6888d3f (diff)
downloadbuildstream-sam/embed-fusepy.tar.gz
fuse.py: Add support for Linux on ppc64sam/embed-fusepy
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
-rw-r--r--buildstream/_fuse/fuse.py16
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),