diff -uraN libdaemon-0.13.orig/libdaemon/dfork.c libdaemon-0.13/libdaemon/dfork.c
--- libdaemon-0.13.orig/libdaemon/dfork.c	2008-07-28 19:37:56.000000000 +0000
+++ libdaemon-0.13/libdaemon/dfork.c	2009-02-06 05:13:04.340684432 +0000
@@ -472,7 +472,7 @@
     int fd;
     int saved_errno;
 
-#ifdef __linux__
+#if defined(__linux__) || defined(__OpenSolaris_kernel__)
 
     DIR *d;
 
