From b1b569622234f4889d3f1629ff84d0926bd3ad55 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 19 Apr 2016 03:20:09 -0400 Subject: app-emulation/wine: fix build w/newer glibc #580046 --- .../wine/files/wine-1.9.7-sysmacros.patch | 177 +++++++++++++++++++++ app-emulation/wine/wine-1.9.7.ebuild | 1 + 2 files changed, 178 insertions(+) create mode 100644 app-emulation/wine/files/wine-1.9.7-sysmacros.patch (limited to 'app-emulation') diff --git a/app-emulation/wine/files/wine-1.9.7-sysmacros.patch b/app-emulation/wine/files/wine-1.9.7-sysmacros.patch new file mode 100644 index 000000000000..4ea515df5c8a --- /dev/null +++ b/app-emulation/wine/files/wine-1.9.7-sysmacros.patch @@ -0,0 +1,177 @@ +From ca8a08606d3f0900b3f4aa8f2e6547882a22dba8 Mon Sep 17 00:00:00 2001 +From: Seong-ho Cho +Date: Mon, 18 Apr 2016 04:25:38 +0900 +Subject: [PATCH] configure: Add AC_HEADER_MAJOR to find where major() is + defined. + +Signed-off-by: Seong-ho Cho +Signed-off-by: Alexandre Julliard +--- + configure | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ + configure.ac | 1 + + dlls/ntdll/cdrom.c | 5 +++++ + dlls/ntdll/directory.c | 5 +++++ + dlls/ntdll/file.c | 5 +++++ + include/config.h.in | 8 ++++++++ + server/fd.c | 5 +++++ + 7 files changed, 79 insertions(+) + +diff --git a/configure b/configure +index 1cb0e59..ffb1825 100755 +--- a/configure ++++ b/configure +@@ -6836,6 +6836,56 @@ fi + + done + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5 ++$as_echo_n "checking whether sys/types.h defines makedev... " >&6; } ++if ${ac_cv_header_sys_types_h_makedev+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include ++int ++main () ++{ ++return makedev(0, 0); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_header_sys_types_h_makedev=yes ++else ++ ac_cv_header_sys_types_h_makedev=no ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5 ++$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; } ++ ++if test $ac_cv_header_sys_types_h_makedev = no; then ++ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default" ++if test "x$ac_cv_header_sys_mkdev_h" = xyes; then : ++ ++$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h ++ ++fi ++ ++ ++ ++ if test $ac_cv_header_sys_mkdev_h = no; then ++ ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default" ++if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then : ++ ++$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h ++ ++fi ++ ++ ++ fi ++fi ++ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 + $as_echo_n "checking whether stat file-mode macros are broken... " >&6; } + if ${ac_cv_header_stat_broken+:} false; then : +diff --git a/configure.ac b/configure.ac +index 6189aa9..201bc77 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -512,6 +512,7 @@ AC_CHECK_HEADERS(\ + valgrind/valgrind.h \ + zlib.h + ) ++AC_HEADER_MAJOR() + AC_HEADER_STAT() + + dnl **** Checks for headers that depend on other ones **** +diff --git a/dlls/ntdll/cdrom.c b/dlls/ntdll/cdrom.c +index ee36045..2c64106 100644 +--- a/dlls/ntdll/cdrom.c ++++ b/dlls/ntdll/cdrom.c +@@ -38,6 +38,11 @@ + #ifdef HAVE_SYS_STAT_H + # include + #endif ++#ifdef MAJOR_IN_MKDEV ++# include ++#elif defined(MAJOR_IN_SYSMACROS) ++# include ++#endif + #include + + #ifdef HAVE_SYS_IOCTL_H +diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c +index 93fe594..4d431c0 100644 +--- a/dlls/ntdll/directory.c ++++ b/dlls/ntdll/directory.c +@@ -47,6 +47,11 @@ + #ifdef HAVE_SYS_ATTR_H + #include + #endif ++#ifdef MAJOR_IN_MKDEV ++# include ++#elif defined(MAJOR_IN_SYSMACROS) ++# include ++#endif + #ifdef HAVE_SYS_VNODE_H + /* Work around a conflict with Solaris' system list defined in sys/list.h. */ + #define list SYSLIST +diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c +index 7e5da59..b3bd9d6 100644 +--- a/dlls/ntdll/file.c ++++ b/dlls/ntdll/file.c +@@ -57,6 +57,11 @@ + #ifdef HAVE_SYS_SOCKET_H + #include + #endif ++#ifdef MAJOR_IN_MKDEV ++# include ++#elif defined(MAJOR_IN_SYSMACROS) ++# include ++#endif + #ifdef HAVE_UTIME_H + # include + #endif +diff --git a/include/config.h.in b/include/config.h.in +index 0650f31..06b192f 100644 +--- a/include/config.h.in ++++ b/include/config.h.in +@@ -1335,6 +1335,14 @@ + /* Define to 1 if you have the `__res_get_state' function. */ + #undef HAVE___RES_GET_STATE + ++/* Define to 1 if `major', `minor', and `makedev' are declared in . ++ */ ++#undef MAJOR_IN_MKDEV ++ ++/* Define to 1 if `major', `minor', and `makedev' are declared in ++ . */ ++#undef MAJOR_IN_SYSMACROS ++ + /* Define to the address where bug reports for this package should be sent. */ + #undef PACKAGE_BUGREPORT + +diff --git a/server/fd.c b/server/fd.c +index 1fd1ce7..17b1b66 100644 +--- a/server/fd.c ++++ b/server/fd.c +@@ -83,6 +83,11 @@ + #endif + #include + #include ++#ifdef MAJOR_IN_MKDEV ++#include ++#elif defined(MAJOR_IN_SYSMACROS) ++#include ++#endif + #include + #include + #ifdef HAVE_SYS_SYSCALL_H +-- +2.7.4 + diff --git a/app-emulation/wine/wine-1.9.7.ebuild b/app-emulation/wine/wine-1.9.7.ebuild index e735b28385d7..a5e6dac5daf9 100644 --- a/app-emulation/wine/wine-1.9.7.ebuild +++ b/app-emulation/wine/wine-1.9.7.ebuild @@ -247,6 +247,7 @@ src_prepare() { "${FILESDIR}"/${PN}-1.9.5-multilib-portage.patch #395615 "${FILESDIR}"/${PN}-1.7.12-osmesa-check.patch #429386 "${FILESDIR}"/${PN}-1.6-memset-O3.patch #480508 + "${FILESDIR}"/${P}-sysmacros.patch #580046 ) if use staging; then ewarn "Applying the Wine-Staging patchset. Any bug reports to the" -- cgit v1.2.3-65-gdbad