summaryrefslogtreecommitdiff
path: root/tests/d_type-check
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2015-07-04 17:13:50 +0300
committerIgor Pashev <pashev.igor@gmail.com>2015-07-04 17:13:50 +0300
commit71cd8e3a743046573744123777061b64881bf372 (patch)
tree82522befe647f4fff186a5630cad0cad33f8ef53 /tests/d_type-check
parentc18578632fd3c9e513e613a86ba2b7c4ebee6c45 (diff)
downloadcoreutils-upstream.tar.gz
Imported Upstream version 8.24upstream/8.24upstream
Diffstat (limited to 'tests/d_type-check')
-rw-r--r--tests/d_type-check5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/d_type-check b/tests/d_type-check
index 33c1fd6d..ff1eb60b 100644
--- a/tests/d_type-check
+++ b/tests/d_type-check
@@ -5,7 +5,7 @@ import sys
fail = 1
try:
- import ctypes
+ import ctypes.util
(DT_UNKNOWN, DT_DIR,) = (0, 4,)
@@ -19,8 +19,7 @@ try:
direntp = ctypes.POINTER(dirent)
- # FIXME: find a way to avoid hard-coding libc's so-name.
- libc = ctypes.cdll.LoadLibrary("libc.so.6")
+ libc = ctypes.CDLL(ctypes.util.find_library('c'), use_errno=True)
libc.readdir.restype = direntp
dirp = libc.opendir(".")