I attached a patch which allows Clisp to find gethostname on Linux.
Index: clisp.lisp
===================================================================
--- clisp.lisp	(revision 521)
+++ clisp.lisp	(working copy)
@@ -7,15 +7,16 @@
 
 
 ;; utility routine for looking up the current host name
-(FFI:DEF-CALL-OUT get-host-name-internal
-         (:name "gethostname")
-         (:arguments (name (FFI:C-PTR (FFI:C-ARRAY-MAX ffi:character 256))
-                           :OUT :ALLOCA)
-                     (len ffi:int))
-         #+win32 (:library "WS2_32")
-         (:language #-win32 :stdc
-                    #+win32 :stdc-stdcall)
-         (:return-type ffi:int))
+(ffi:def-call-out get-host-name-internal
+    (:name "gethostname")
+  (:arguments (name (ffi:c-ptr (ffi:c-array-max ffi:character 256))
+                    :out :alloca)
+              (len ffi:int))
+  #+win32 (:library "WS2_32")
+  #-win32 (:library :default)
+  (:language #-win32 :stdc
+             #+win32 :stdc-stdcall)
+  (:return-type ffi:int))
 
 
 (defun get-host-name ()
-- 
With Best Regards, Stas.
_______________________________________________
usocket-devel mailing list
usocket-devel@common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/usocket-devel

Reply via email to