summaryrefslogtreecommitdiff
path: root/tests/unix/ffi_float.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unix/ffi_float.py')
-rw-r--r--tests/unix/ffi_float.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/unix/ffi_float.py b/tests/unix/ffi_float.py
index c92a39bcd..317436855 100644
--- a/tests/unix/ffi_float.py
+++ b/tests/unix/ffi_float.py
@@ -18,7 +18,14 @@ def ffi_open(names):
libc = ffi_open(('libc.so', 'libc.so.0', 'libc.so.6', 'libc.dylib'))
-strtof = libc.func("f", "strtof", "sp")
+try:
+ strtof = libc.func("f", "strtof", "sp")
+except OSError:
+ # Some libc's (e.g. Android's Bionic) define strtof as macro/inline func
+ # in terms of strtod().
+ print("SKIP")
+ raise SystemExit
+
print('%.6f' % strtof('1.23', None))
strtod = libc.func("d", "strtod", "sp")