From: Rob Browning Date: Sun, 15 Mar 2015 15:34:38 +0000 (-0500) Subject: Use *native* type sizes in file attr guard X-Git-Tag: 0.27-rc4~8 X-Git-Url: https://arthur.barton.de/gitweb/?p=bup.git;a=commitdiff_plain;h=9709d46be7f849b3c495831c37a2d5aec608cbf2 Use *native* type sizes in file attr guard I'd misunderstood what Python struct meant by the *standard* size, and what I'd wanted in the guard was the native size, so ask for that (via '@'). Thanks to Robert Edmunds for running a build through the Debian buildds and then reporting the problem that revealed on s390x. Signed-off-by: Rob Browning Tested-by: Rob Browning --- diff --git a/lib/bup/metadata.py b/lib/bup/metadata.py index 8a84f11..390c5ac 100644 --- a/lib/bup/metadata.py +++ b/lib/bup/metadata.py @@ -44,8 +44,9 @@ except ImportError: get_linux_file_attr = set_linux_file_attr = None +# See the bup_get_linux_file_attr() comments. _suppress_linux_file_attr = \ - sys.byteorder == 'big' and struct.calcsize('=l') > struct.calcsize('=i') + sys.byteorder == 'big' and struct.calcsize('@l') > struct.calcsize('@i') def check_linux_file_attr_api(): global get_linux_file_attr, set_linux_file_attr