Index: mtools-4.0.23/mformat.c =================================================================== --- mtools-4.0.23.orig/mformat.c 2018-12-10 00:18:40.000000000 +0100 +++ mtools-4.0.23/mformat.c 2018-12-28 18:46:05.933555058 +0100 @@ -19,6 +19,7 @@ */ #define DONT_NEED_WAIT +#define DONT_NEED_IN #include "sysincludes.h" #include "msdos.h" @@ -48,7 +49,7 @@ #define _LINUX_STRING_H_ #define kdev_t int -#include "linux/fs.h" +#include "sys/mount.h" #undef _LINUX_STRING_H_ #endif Index: mtools-4.0.23/mpartition.c =================================================================== --- mtools-4.0.23.orig/mpartition.c 2018-12-09 23:56:07.000000000 +0100 +++ mtools-4.0.23/mpartition.c 2018-12-28 18:46:05.933555058 +0100 @@ -17,6 +17,7 @@ * mformat.c */ #define DONT_NEED_WAIT +#define DONT_NEED_IN #include "sysincludes.h" #include "msdos.h" @@ -35,7 +36,7 @@ #define _LINUX_STRING_H_ #define kdev_t int -#include "linux/fs.h" +#include "sys/mount.h" #undef _LINUX_STRING_H_ #endif Index: mtools-4.0.23/sysincludes.h =================================================================== --- mtools-4.0.23.orig/sysincludes.h 2018-12-28 18:46:05.933555058 +0100 +++ mtools-4.0.23/sysincludes.h 2018-12-28 18:48:58.902333733 +0100 @@ -359,12 +359,16 @@ extern int errno; #endif #ifdef HAVE_NETINET_TCP_H +#ifndef DONT_NEED_IN #include #endif +#endif #ifdef HAVE_ARPA_INET_H +#ifndef DONT_NEED_IN #include #endif +#endif #ifdef HAVE_NETDB_H #include