From 9709d46be7f849b3c495831c37a2d5aec608cbf2 Mon Sep 17 00:00:00 2001 From: Rob Browning Date: Sun, 15 Mar 2015 10:34:38 -0500 Subject: [PATCH] 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 --- lib/bup/metadata.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.39.2