diff -urN a/wine-1.9.7/configure.ac b/wine-1.9.7/configure.ac --- a/wine-1.9.7/configure.ac 2016-04-16 05:38:03.269107700 +0900 +++ b/wine-1.9.7/configure.ac 2016-04-16 05:38:32.642680740 +0900 @@ -520,6 +520,7 @@ sys/strtio.h \ sys/syscall.h \ sys/sysinfo.h \ + sys/sysmacros.h \ sys/tihdr.h \ sys/time.h \ sys/timeout.h \ diff -urN a/wine-1.9.7/dlls/ntdll/cdrom.c b/wine-1.9.7/dlls/ntdll/cdrom.c --- a/wine-1.9.7/dlls/ntdll/cdrom.c 2016-04-16 05:38:03.283107497 +0900 +++ b/wine-1.9.7/dlls/ntdll/cdrom.c 2016-04-16 05:41:22.542204687 +0900 @@ -28,6 +28,7 @@ #include #include #include +#include #ifdef HAVE_IO_H # include #endif @@ -38,6 +39,11 @@ #ifdef HAVE_SYS_STAT_H # include #endif +#if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 23 + #ifdef HAVE_SYS_SYSMACROS_H + #include + #endif +#endif #include #ifdef HAVE_SYS_IOCTL_H diff -urN a/wine-1.9.7/dlls/ntdll/directory.c b/wine-1.9.7/dlls/ntdll/directory.c --- a/wine-1.9.7/dlls/ntdll/directory.c 2016-04-16 05:38:03.284107482 +0900 +++ b/wine-1.9.7/dlls/ntdll/directory.c 2016-04-16 05:41:57.085700104 +0900 @@ -41,6 +41,7 @@ #include #include #include +#include #ifdef HAVE_MNTENT_H #include #endif @@ -89,6 +90,11 @@ #ifdef HAVE_SYS_STATFS_H #include #endif +#if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 23 + #ifdef HAVE_SYS_SYSMACROS_H + #include + #endif +#endif #ifdef HAVE_TERMIOS_H # include #endif diff -urN a/wine-1.9.7/dlls/ntdll/file.c b/wine-1.9.7/dlls/ntdll/file.c --- a/wine-1.9.7/dlls/ntdll/file.c 2016-04-16 05:38:03.284107482 +0900 +++ b/wine-1.9.7/dlls/ntdll/file.c 2016-04-16 05:42:15.901425116 +0900 @@ -24,6 +24,7 @@ #include #include #include +#include #ifdef HAVE_UNISTD_H # include #endif @@ -57,6 +58,11 @@ #ifdef HAVE_SYS_SOCKET_H #include #endif +#if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 23 + #ifdef HAVE_SYS_SYSMACROS_H + #include + #endif +#endif #ifdef HAVE_UTIME_H # include #endif diff -urN a/wine-1.9.7/server/fd.c b/wine-1.9.7/server/fd.c --- a/wine-1.9.7/server/fd.c 2016-04-16 05:38:03.434105303 +0900 +++ b/wine-1.9.7/server/fd.c 2016-04-16 05:40:19.055131105 +0900 @@ -31,6 +31,7 @@ #include #include #include +#include #ifdef HAVE_POLL_H #include #endif @@ -88,6 +89,11 @@ #ifdef HAVE_SYS_SYSCALL_H #include #endif +#if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 23 + #ifdef HAVE_SYS_SYSMACROS_H + #include + #endif +#endif #include "ntstatus.h" #define WIN32_NO_STATUS