summaryrefslogtreecommitdiff
path: root/Lib/platform.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/platform.py')
-rwxr-xr-xLib/platform.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/platform.py b/Lib/platform.py
index 62a5476a8f..e04d87f258 100755
--- a/Lib/platform.py
+++ b/Lib/platform.py
@@ -194,7 +194,10 @@ def libc_ver(executable=sys.executable,lib='',version='', chunksize=2048):
binary = f.read(chunksize)
pos = 0
while pos < len(binary):
- m = _libc_search.search(binary,pos)
+ if 'libc' in binary or 'GLIBC' in binary:
+ m = _libc_search.search(binary, pos)
+ else:
+ m = None
if not m or m.end() == len(binary):
chunk = f.read(chunksize)
if chunk: