diff --git a/lib/drv_enum.c b/lib/drv_enum.c
index 5fd74d0c..45abaa19 100644
--- a/lib/drv_enum.c
+++ b/lib/drv_enum.c
@@ -14,6 +14,7 @@
 #include <stdbool.h>
 #include <sys/stat.h>
 #include <sys/types.h>
+#include <sys/sysmacros.h>
 #include <dirent.h>
 #include <errno.h>
 
diff --git a/plugins/default.c b/plugins/default.c
index 79c942d6..92a89c81 100644
--- a/plugins/default.c
+++ b/plugins/default.c
@@ -27,6 +27,7 @@
 #include <stdlib.h>
 #include <sys/stat.h>
 #include <sys/types.h>
+#include <sys/sysmacros.h>
 #include <sys/ioctl.h>
 #include <sys/socket.h>
 #include <sys/un.h>
