diff -ur a/libkms/linux.c b/libkms/linux.c
--- a/libkms/linux.c
+++ b/libkms/linux.c
@@ -39,6 +39,7 @@
 #include <unistd.h>
 
 #include <sys/stat.h>
+#include <sys/sysmacros.h>
 
 #include "internal.h"
 
