[PATCH] Compile and works on OpenSolaris (tested on BeleniX)
diff --git a/init.c b/init.c
index 0ec8e9d..3117d60 100644
--- a/init.c
+++ b/init.c
@@ -1013,7 +1013,7 @@
 	struct shmid_ds sbuf;
 
 	if (threads) {
-		shmdt(threads);
+		shmdt((void *) threads);
 		threads = NULL;
 		shmctl(shm_id, IPC_RMID, &sbuf);
 	}