diff -rN -u old-iolib-posix/iolib-alien-grovel.lisp new-iolib-posix/iolib-alien-grovel.lisp
--- old-iolib-posix/iolib-alien-grovel.lisp	2007-03-09 22:36:45.000000000 -0500
+++ new-iolib-posix/iolib-alien-grovel.lisp	2007-03-09 22:36:45.000000000 -0500
@@ -283,7 +283,10 @@
 	  (loop :for item :in standard-body-items :do (process-item out item))
 	  (loop :for item :in body-items :do (process-item out item))
 	  (princ +main-2+ out)))
-      (apply #'invoke +cc+ "-o" executable-name c-output-name *cc-flags*)
+      (apply #'invoke +cc+
+             #+cffi-features:x86-64 "-m64"
+             #+cffi-features:x86 "-m32"
+             "-o" executable-name c-output-name *cc-flags*)
       (invoke executable-name intermediate-output-name))))
 
 (defun item-kind (item)
@@ -429,6 +432,7 @@
 					    type
 					    count)
 	    slot
+          (declare (ignorable slot-c-name))
 	  (c-format out "~%  (")
 	  (c-print-symbol out slot-lisp-name t)
 	  (c-format out " ")
diff -rN -u old-iolib-posix/misc.lisp new-iolib-posix/misc.lisp
--- old-iolib-posix/misc.lisp	2007-03-09 22:36:45.000000000 -0500
+++ new-iolib-posix/misc.lisp	2007-03-09 22:36:45.000000000 -0500
@@ -10,5 +10,5 @@
         (declare (ignore err))
         nil))))
 
-(defun finalize-object-closing-fd (object fd)
-  (finalize object #'(lambda () (et:close fd))))
+;;(defun finalize-object-closing-fd (object fd)
+;;  (finalize object #'(lambda () (et:close fd))))
diff -rN -u old-iolib-posix/system-libraries.lisp new-iolib-posix/system-libraries.lisp
--- old-iolib-posix/system-libraries.lisp	2007-03-09 22:36:45.000000000 -0500
+++ new-iolib-posix/system-libraries.lisp	2007-03-09 22:36:45.000000000 -0500
@@ -2,5 +2,10 @@
 
 (in-package :iolib-posix)
 
-#+linux
+#+(and sbcl linux)
+;;(sb-alien:load-shared-object "/lib/tls/librt.so.1")
+(sb-alien:load-shared-object "librt.so.1")
+
+#+(and linux (not sbcl))
 (cffi:load-foreign-library "librt.so")
+
diff -rN -u old-iolib-posix/unixint.lisp new-iolib-posix/unixint.lisp
--- old-iolib-posix/unixint.lisp	2007-03-09 22:36:45.000000000 -0500
+++ new-iolib-posix/unixint.lisp	2007-03-09 22:36:45.000000000 -0500
@@ -17,7 +17,8 @@
           "syslog.h" "sys/resource.h" "stdlib.h" "sys/utsname.h"
           "sys/statvfs.h"
           #+linux "sys/epoll.h"
-          #+linux "sys/inotify.h"
+          #+(and linux inotify) "linux/inotify.h"
+          #+(and (not linux) inotify) "sys/inotify.h"
           ;; for kqueue
           #+freebsd "sys/event.h" #+freebsd "sys/time.h")
 
@@ -1021,7 +1022,7 @@
 ;; from sys/inotify.h
 ;;
 
-#+linux
+#+inotify
 (cstruct inotify-event "struct inotify_event"
  (wd     "wd"     :type :int)
  (mask   "mask"   :type :uint32)
@@ -1029,31 +1030,31 @@
  (len    "len"    :type :uint32)
  (name   "name"   :type :string))
 
-#+linux (constant (in-access "IN_ACCESS") :documentation "File was accessed.")
-#+linux (constant (in-modify "IN_MODIFY") :documentation "File was modified.")
-#+linux (constant (in-attrib "IN_ATTRIB") :documentation "Metadata changed.")
-#+linux (constant (in-close-write "IN_CLOSE_WRITE") :documentation "Writtable file was closed.")
-#+linux (constant (in-close-nowrite "IN_CLOSE_NOWRITE") :documentation "Unwrittable file closed.")
-#+linux (constant (in-close "IN_CLOSE") :documentation "Close.")
-#+linux (constant (in-open "IN_OPEN") :documentation "File was opened.")
-#+linux (constant (in-moved-from "IN_MOVED_FROM") :documentation "File was moved from X.")
-#+linux (constant (in-moved-to "IN_MOVED_TO") :documentation "File was moved to Y.")
-#+linux (constant (in-move "IN_MOVE") :documentation "Moves.")
-#+linux (constant (in-create "IN_CREATE") :documentation "Subfile was created.")
-#+linux (constant (in-delete "IN_DELETE") :documentation "Subfile was deleted.")
-#+linux (constant (in-delete-self "IN_DELETE_SELF") :documentation "Self was deleted.")
-#+linux (constant (in-move-self "IN_MOVE_SELF") :documentation "Self was moved.")
-#+linux (constant (in-unmount "IN_UNMOUNT") :documentation "Backing fs was unmounted.")
-#+linux (constant (in-q-overflow "IN_Q_OVERFLOW") :documentation "Event queued overflowed.")
-#+linux (constant (in-ignored "IN_IGNORED") :documentation "File was ignored.")
-#+linux (constant (in-close "IN_CLOSE") :documentation "Close.")
-#+linux (constant (in-move "IN_MOVE") :documentation "Moves.")
-#+linux (constant (in-onlydir "IN_ONLYDIR") :documentation "Only watch the path if it is a directory.")
-#+linux (constant (in-dont-follow "IN_DONT_FOLLOW") :documentation "Do not follow a symlink.")
-#+linux (constant (in-mask-add "IN_MASK_ADD") :documentation "Add to the mask of an already existing watch.")
-#+linux (constant (in-isdir "IN_ISDIR") :documentation "Event occurred against dir.")
-#+linux (constant (in-oneshot "IN_ONESHOT") :documentation "Only send event once.")
-#+linux (constant (in-all-events "IN_ALL_EVENTS") :documentation "All events which a program can wait on.")
+#+inotify (constant (in-access "IN_ACCESS") :documentation "File was accessed.")
+#+inotify (constant (in-modify "IN_MODIFY") :documentation "File was modified.")
+#+inotify (constant (in-attrib "IN_ATTRIB") :documentation "Metadata changed.")
+#+inotify (constant (in-close-write "IN_CLOSE_WRITE") :documentation "Writtable file was closed.")
+#+inotify (constant (in-close-nowrite "IN_CLOSE_NOWRITE") :documentation "Unwrittable file closed.")
+#+inotify (constant (in-close "IN_CLOSE") :documentation "Close.")
+#+inotify (constant (in-open "IN_OPEN") :documentation "File was opened.")
+#+inotify (constant (in-moved-from "IN_MOVED_FROM") :documentation "File was moved from X.")
+#+inotify (constant (in-moved-to "IN_MOVED_TO") :documentation "File was moved to Y.")
+#+inotify (constant (in-move "IN_MOVE") :documentation "Moves.")
+#+inotify (constant (in-create "IN_CREATE") :documentation "Subfile was created.")
+#+inotify (constant (in-delete "IN_DELETE") :documentation "Subfile was deleted.")
+#+inotify (constant (in-delete-self "IN_DELETE_SELF") :documentation "Self was deleted.")
+#+inotify (constant (in-move-self "IN_MOVE_SELF") :documentation "Self was moved.")
+#+inotify (constant (in-unmount "IN_UNMOUNT") :documentation "Backing fs was unmounted.")
+#+inotify (constant (in-q-overflow "IN_Q_OVERFLOW") :documentation "Event queued overflowed.")
+#+inotify (constant (in-ignored "IN_IGNORED") :documentation "File was ignored.")
+#+inotify (constant (in-close "IN_CLOSE") :documentation "Close.")
+#+inotify (constant (in-move "IN_MOVE") :documentation "Moves.")
+#+inotify (constant (in-onlydir "IN_ONLYDIR") :documentation "Only watch the path if it is a directory.")
+#+inotify (constant (in-dont-follow "IN_DONT_FOLLOW") :documentation "Do not follow a symlink.")
+#+inotify (constant (in-mask-add "IN_MASK_ADD") :documentation "Add to the mask of an already existing watch.")
+#+inotify (constant (in-isdir "IN_ISDIR") :documentation "Event occurred against dir.")
+#+inotify (constant (in-oneshot "IN_ONESHOT") :documentation "Only send event once.")
+#+inotify (constant (in-all-events "IN_ALL_EVENTS") :documentation "All events which a program can wait on.")
 
 
 ;;
diff -rN -u old-iolib-posix/unix.lisp new-iolib-posix/unix.lisp
--- old-iolib-posix/unix.lisp	2007-03-09 22:36:45.000000000 -0500
+++ new-iolib-posix/unix.lisp	2007-03-09 22:36:45.000000000 -0500
@@ -838,11 +838,11 @@
 ;;;               ;;;
 ;;;;;;;;;;;;;;;;;;;;;
 
-#+linux
+#+inotify
 (defsyscall "inotify_init" :int
   "Create and initialize inotify instance.")
 
-#+linux
+#+inotify
 (defsyscall "inotify_add_watch" :int
   "Add watch of object NAME to inotify instance FD.
 Notify about events specified by MASK."
@@ -850,7 +850,7 @@
   (name :string)
   (mask :uint32))
 
-#+linux
+#+inotify
 (defsyscall "inotify_rm_watch" :int
   "Remove the watch specified by WD from the inotify instance FD."
   (fd :int)
@@ -999,7 +999,7 @@
   "Opens a directory for listing of its contents"
   (filename :string))
 
-#+linux
+#+fdopendir
 (defsyscall "fdopendir" :pointer
   "Opens a directory for listing of its contents"
   (fd :int))

