This patch fixes build warnings on illumos.
diff --git a/daemonize.c b/daemonize.c
index 3d2b40e..606b965 100644
--- a/daemonize.c
+++ b/daemonize.c
@@ -20,10 +20,12 @@
#include <unistd.h>
#include <sys/types.h>
#include <pwd.h>
+#include <grp.h>
#include <stdarg.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/file.h>
+#include <libgen.h>
#include "config.h"
#include "version.h"