File rtslib-fix-64bit-SIOCGIFCONF-unmarshalling.patch of Package python-rtslib.1545
Don't assume "_64" uname architecture suffix for 64-bit architectures,
as it fails on ppc64le and aarch64. Use python's platform.architecture()
call instead.
Bug: https://bugzilla.suse.com/show_bug.cgi?id=956509
Index: rtslib-2.2/rtslib/utils.py
===================================================================
--- rtslib-2.2.orig/rtslib/utils.py
+++ rtslib-2.2/rtslib/utils.py
@@ -19,6 +19,7 @@ under the License.
import re
import os
+import platform
import stat
import uuid
import glob
@@ -642,7 +643,7 @@ def list_eth_names(max_eth=1024):
struct.
'''
SIOCGIFCONF = 0x8912
- if os.uname()[4].endswith("_64"):
+ if platform.architecture()[0] == '64bit':
offset = 40
else:
offset = 32