--- a/growisofs.c
+++ b/growisofs.c
@@ -444,6 +444,10 @@
 #include <assert.h>
 #include "mp.h"
 
+#if defined(__GNU_LIBRARY__)
+# include <sys/sysmacros.h>
+#endif
+
 #if defined(__unix) || defined(__unix__)
 # include <unistd.h>
 # include <sys/time.h>
--- a/transport.hxx
+++ b/transport.hxx
@@ -53,6 +53,10 @@
 #define ENV_LOCALE	".OCP"
 #endif
 
+#if defined(__GNU_LIBRARY__)
+# include <sys/sysmacros.h>
+#endif
+
 #include "asctable.h"
 
 #define CREAM_ON_ERRNO_NAKED(s)				\