--- a/panel-plugin/libacpi.c
+++ b/panel-plugin/libacpi.c
@@ -29,7 +29,6 @@
 #include <sys/types.h>
 #include <dirent.h>
 #include <glob.h>
-#include <unistd.h>
 
 #ifdef __FreeBSD__
 #include <fcntl.h>
@@ -55,6 +54,8 @@
 #include <errno.h>
 
 #endif
+
+#include <unistd.h>
 
 #include "libacpi.h"
 
