$OpenBSD: patch-Lib_test_test_dl_py,v 1.2 2011/07/06 12:05:56 jasper Exp $
--- Lib/test/test_dl.py.orig	Sun Feb  7 00:02:29 2010
+++ Lib/test/test_dl.py	Wed Jul  6 14:05:40 2011
@@ -6,11 +6,21 @@ import unittest
 from test.test_support import verbose, import_module
 dl = import_module('dl', deprecated=True)
 
+import dircache
+libcNames = []
+libcName = ''
+for file in dircache.listdir('/usr/lib/'):
+       if '/libc.so.' in file:
+               libcNames.append(file)
+# Pick the most recent (highest number) libc
+if len(libcNames) > 0:
+       libcName = sorted(libcNames)[-1]
+if not libcName:
+       raise TestSkipped
+
+
 sharedlibs = [
-    ('/usr/lib/libc.so', 'getpid'),
-    ('/lib/libc.so.6', 'getpid'),
-    ('/usr/bin/cygwin1.dll', 'getpid'),
-    ('/usr/lib/libc.dylib', 'getpid'),
+        (libcName, 'getpid'),
     ]
 
 def test_main():
