From 3fdddbae638d95a7085abbc9bc46cbf985e27758 Mon Sep 17 00:00:00 2001
From: John Zhang <john.zhang@anu.edu.au>
Date: Tue, 6 Dec 2016 12:53:50 +1100
Subject: [PATCH] suggested fix

---
 rpython/rtyper/lltypesystem/test/test_ll2ctypes.py | 6 +++---
 rpython/translator/platform/darwin.py              | 1 +
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/rpython/rtyper/lltypesystem/test/test_ll2ctypes.py b/rpython/rtyper/lltypesystem/test/test_ll2ctypes.py
index b1e1f73..c20071c 100644
--- a/rpython/rtyper/lltypesystem/test/test_ll2ctypes.py
+++ b/rpython/rtyper/lltypesystem/test/test_ll2ctypes.py
@@ -1467,8 +1467,8 @@ class TestPlatform(object):
 
     def test_prefix(self):
 
-        if not sys.platform.startswith('linux'):
-            py.test.skip("Not supported")
+        # if not sys.platform.startswith('linux'):
+        #     py.test.skip("Not supported")
 
         from rpython.translator.platform import platform
 
@@ -1482,7 +1482,7 @@ class TestPlatform(object):
         eci = ExternalCompilationInfo(include_dirs=[cdir])
         so = platform.compile([c_file], eci, standalone=False)
         sopath = py.path.local(so)
-        sopath.move(sopath.dirpath().join('libc_file.so'))
+        sopath.move(sopath.dirpath().join('libc_file.' + platform.so_ext))
         eci = ExternalCompilationInfo(
             libraries = ['c_file'],
             library_dirs = [str(so.dirpath())]
diff --git a/rpython/translator/platform/darwin.py b/rpython/translator/platform/darwin.py
index 628c26a..9615457 100644
--- a/rpython/translator/platform/darwin.py
+++ b/rpython/translator/platform/darwin.py
@@ -20,6 +20,7 @@ class Darwin(posix.BasePosix):
     link_flags = (DARWIN_VERSION_MIN,)
     cflags = ('-O3', '-fomit-frame-pointer', DARWIN_VERSION_MIN)
 
+    so_prefixes = ('lib', '')
     so_ext = 'dylib'
     DEFAULT_CC = 'clang'
     rpath_flags = ['-Wl,-rpath', '-Wl,@executable_path/']
-- 
2.9.3 (Apple Git-75)

