[sup-talk] [PATCH] fixed dlopen of libc for os x

Grant Hollingworth grant at antiflux.org
Thu Apr 24 19:10:24 EDT 2008


OS X likes to do its own thing.

---
 lib/sup.rb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/sup.rb b/lib/sup.rb
index c4d1dd5..afd030f 100644
--- a/lib/sup.rb
+++ b/lib/sup.rb
@@ -14,7 +14,7 @@ require 'curses'
 require 'dl/import'
 module LibC
   extend DL::Importable
-  dlload "libc.so.6"
+  dlload Config::CONFIG['arch'] =~ /darwin/ ? "libc.dylib" : "libc.so.6"
   extern "void setlocale(int, const char *)"
 end
 LibC.setlocale(6, "")  # LC_ALL == 6
-- 
1.5.4.4


More information about the sup-talk mailing list