From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 9B36D1382C5 for ; Mon, 26 Feb 2018 12:36:02 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BEA66E07B3; Mon, 26 Feb 2018 12:36:01 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8D02DE07B3 for ; Mon, 26 Feb 2018 12:36:01 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 05321335C06 for ; Mon, 26 Feb 2018 12:36:00 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 017281D8 for ; Mon, 26 Feb 2018 12:35:58 +0000 (UTC) From: "Lars Wendler" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Lars Wendler" Message-ID: <1519648495.711f07a43b5e011123a93e7b09edcdce1008f4cd.polynomial-c@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-process/htop/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-process/htop/files/htop-2.1.0-sysmacros.patch X-VCS-Directories: sys-process/htop/files/ X-VCS-Committer: polynomial-c X-VCS-Committer-Name: Lars Wendler X-VCS-Revision: 711f07a43b5e011123a93e7b09edcdce1008f4cd X-VCS-Branch: master Date: Mon, 26 Feb 2018 12:35:58 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: c95caee4-fd31-4ca9-886c-9eb58afb7f5b X-Archives-Hash: 23e75d31c3b7d30b0b876b2ae1a88992 commit: 711f07a43b5e011123a93e7b09edcdce1008f4cd Author: Lars Wendler gentoo org> AuthorDate: Mon Feb 26 12:34:55 2018 +0000 Commit: Lars Wendler gentoo org> CommitDate: Mon Feb 26 12:34:55 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=711f07a4 sys-process/htop: Replaced sysmacros patch with a much better one. See https://github.com/hishamhm/htop/pull/746 Closes: https://bugs.gentoo.org/648630 Package-Manager: Portage-2.3.24, Repoman-2.3.6 sys-process/htop/files/htop-2.1.0-sysmacros.patch | 91 ++++++++++++++++------- 1 file changed, 66 insertions(+), 25 deletions(-) diff --git a/sys-process/htop/files/htop-2.1.0-sysmacros.patch b/sys-process/htop/files/htop-2.1.0-sysmacros.patch index 63677dd35fa..0ab1bb0c02a 100644 --- a/sys-process/htop/files/htop-2.1.0-sysmacros.patch +++ b/sys-process/htop/files/htop-2.1.0-sysmacros.patch @@ -1,40 +1,81 @@ -From 7fd09c08b5b50e5c0a2aebb66072deda4ac503fb Mon Sep 17 00:00:00 2001 -From: Lars Wendler -Date: Mon, 5 Feb 2018 16:02:19 +0100 -Subject: [PATCH] Add to two files. +From d2d413161bbdf009f232faa5789131326225f838 Mon Sep 17 00:00:00 2001 +From: Explorer09 +Date: Sat, 24 Feb 2018 11:57:18 +0800 +Subject: [PATCH] Fix build failure ('major' undefined) in glibc 2.28. ->=glibc-2.28 will no longer include sysmacros implicitly. +glibc 2.28 no longer defines 'major' and 'minor' in and +requires us to include . (glibc 2.25 starts +deprecating the macros in .) Now do include the latter if +found on the system. + +At the moment, let's also utilize AC_HEADER_MAJOR in configure script. +However as Autoconf 2.69 has not yet updated the AC_HEADER_MAJOR macro +to reflect the glibc change [1], so add a workaround code. + +Fixes #663. Supersedes pull request #729. + +Reference: +[1] https://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commit;h=e17a30e987d7ee695fb4294a82d987ec3dc9b974 + +Signed-off-by: Kang-Che Sung --- - Process.c | 3 +++ - linux/LinuxProcessList.c | 1 + - 2 files changed, 4 insertions(+) + Process.c | 6 ++++++ + configure.ac | 10 ++++++++++ + linux/LinuxProcessList.c | 6 ++++++ + 3 files changed, 22 insertions(+) diff --git a/Process.c b/Process.c -index 2ff778d..e135c60 100644 +index 2ff778df..845ca54b 100644 --- a/Process.c +++ b/Process.c -@@ -19,6 +19,9 @@ in the source distribution for its full text. - #include - #include - #include -+#ifdef HAVE_SYS_SYSMACROS_H -+# include /* for major, minor */ +@@ -28,6 +28,12 @@ in the source distribution for its full text. + #include + #include + #include ++#ifdef MAJOR_IN_MKDEV ++#include ++#elif defined(MAJOR_IN_SYSMACROS) || \ ++ (defined(HAVE_SYS_SYSMACROS_H) && HAVE_SYS_SYSMACROS_H) ++#include +#endif - #include - #include - #include + + #ifdef __ANDROID__ + #define SYS_ioprio_get __NR_ioprio_get +diff --git a/configure.ac b/configure.ac +index 44595050..36aebc5e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -61,6 +61,16 @@ AC_CHECK_HEADERS([stdlib.h string.h strings.h sys/param.h sys/time.h unistd.h],[ + ]) + AC_CHECK_HEADERS([execinfo.h],[:],[:]) + ++AC_HEADER_MAJOR ++dnl glibc 2.25 deprecates 'major' and 'minor' in and requires to ++dnl include . However the logic in AC_HEADER_MAJOR has not yet ++dnl been updated in Autoconf 2.69, so use a workaround: ++m4_version_prereq([2.70], [], ++[if test $ac_cv_header_sys_mkdev_h = no; then ++ AC_CHECK_HEADER(sys/sysmacros.h, [AC_DEFINE(MAJOR_IN_SYSMACROS, 1, ++ [Define to 1 if `major', `minor', and `makedev' are declared in .])]) ++fi]) ++ + # Checks for typedefs, structures, and compiler characteristics. + # ---------------------------------------------------------------------- + AC_HEADER_STDBOOL diff --git a/linux/LinuxProcessList.c b/linux/LinuxProcessList.c -index c8ba89d..fb95440 100644 +index c8ba89d2..158a7ea2 100644 --- a/linux/LinuxProcessList.c +++ b/linux/LinuxProcessList.c -@@ -25,6 +25,7 @@ in the source distribution for its full text. - #include +@@ -26,6 +26,12 @@ in the source distribution for its full text. #include #include -+#include #include ++#ifdef MAJOR_IN_MKDEV ++#include ++#elif defined(MAJOR_IN_SYSMACROS) || \ ++ (defined(HAVE_SYS_SYSMACROS_H) && HAVE_SYS_SYSMACROS_H) ++#include ++#endif #ifdef HAVE_DELAYACCT --- -2.16.2 - + #include