public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Mike Gilbert" <floppym@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-boot/grub/, sys-boot/grub/files/
Date: Sun, 24 Apr 2016 15:30:24 +0000 (UTC)	[thread overview]
Message-ID: <1461511822.8fa466c0ac9da67c50cb8400197c37d0a5fef33b.floppym@gentoo> (raw)

commit:     8fa466c0ac9da67c50cb8400197c37d0a5fef33b
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 24 15:29:25 2016 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sun Apr 24 15:30:22 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8fa466c0

sys-boot/grub: backport sysmacros fix

Bug: https://bugs.gentoo.org/580172

Package-Manager: portage-2.2.28_p71

 sys-boot/grub/files/2.02_beta3-sysmacros.patch | 107 +++++++++++++++++++++++++
 sys-boot/grub/grub-2.02_beta3-r1.ebuild        |   1 +
 2 files changed, 108 insertions(+)

diff --git a/sys-boot/grub/files/2.02_beta3-sysmacros.patch b/sys-boot/grub/files/2.02_beta3-sysmacros.patch
new file mode 100644
index 0000000..8610f3a
--- /dev/null
+++ b/sys-boot/grub/files/2.02_beta3-sysmacros.patch
@@ -0,0 +1,107 @@
+From 7a5b301e3adb8e054288518a325135a1883c1c6c Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Tue, 19 Apr 2016 14:27:22 -0400
+Subject: [PATCH] build: Use AC_HEADER_MAJOR to find device macros
+
+Depending on the OS/libc, device macros are defined in different
+headers. This change ensures we include the right one.
+
+sys/types.h - BSD
+sys/mkdev.h - Sun
+sys/sysmacros.h - glibc (Linux)
+
+glibc currently pulls sys/sysmacros.h into sys/types.h, but this may
+change in a future release.
+
+https://sourceware.org/ml/libc-alpha/2015-11/msg00253.html
+---
+ configure.ac                         | 3 ++-
+ grub-core/osdep/devmapper/getroot.c  | 6 ++++++
+ grub-core/osdep/devmapper/hostdisk.c | 5 +++++
+ grub-core/osdep/linux/getroot.c      | 6 ++++++
+ grub-core/osdep/unix/getroot.c       | 4 +++-
+ 5 files changed, 22 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 57e1713..9ddfc53 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -388,7 +388,8 @@ fi
+ 
+ # Check for functions and headers.
+ AC_CHECK_FUNCS(posix_memalign memalign getextmntent)
+-AC_CHECK_HEADERS(sys/param.h sys/mount.h sys/mnttab.h sys/mkdev.h limits.h)
++AC_CHECK_HEADERS(sys/param.h sys/mount.h sys/mnttab.h limits.h)
++AC_HEADER_MAJOR
+ 
+ AC_CHECK_MEMBERS([struct statfs.f_fstypename],,,[$ac_includes_default
+ #include <sys/param.h>
+diff --git a/grub-core/osdep/devmapper/getroot.c b/grub-core/osdep/devmapper/getroot.c
+index 05eda50..72e5582 100644
+--- a/grub-core/osdep/devmapper/getroot.c
++++ b/grub-core/osdep/devmapper/getroot.c
+@@ -40,6 +40,12 @@
+ #include <limits.h>
+ #endif
+ 
++#if defined(MAJOR_IN_MKDEV)
++#include <sys/mkdev.h>
++#elif defined(MAJOR_IN_SYSMACROS)
++#include <sys/sysmacros.h>
++#endif
++
+ #include <libdevmapper.h>
+ 
+ #include <grub/types.h>
+diff --git a/grub-core/osdep/devmapper/hostdisk.c b/grub-core/osdep/devmapper/hostdisk.c
+index 19c1101..a697bcb 100644
+--- a/grub-core/osdep/devmapper/hostdisk.c
++++ b/grub-core/osdep/devmapper/hostdisk.c
+@@ -24,6 +24,11 @@
+ #include <errno.h>
+ #include <limits.h>
+ 
++#if defined(MAJOR_IN_MKDEV)
++#include <sys/mkdev.h>
++#elif defined(MAJOR_IN_SYSMACROS)
++#include <sys/sysmacros.h>
++#endif
+ 
+ #ifdef HAVE_DEVICE_MAPPER
+ # include <libdevmapper.h>
+diff --git a/grub-core/osdep/linux/getroot.c b/grub-core/osdep/linux/getroot.c
+index 10480b6..09e7e6e 100644
+--- a/grub-core/osdep/linux/getroot.c
++++ b/grub-core/osdep/linux/getroot.c
+@@ -35,6 +35,12 @@
+ #include <limits.h>
+ #endif
+ 
++#if defined(MAJOR_IN_MKDEV)
++#include <sys/mkdev.h>
++#elif defined(MAJOR_IN_SYSMACROS)
++#include <sys/sysmacros.h>
++#endif
++
+ #include <grub/types.h>
+ #include <sys/ioctl.h>         /* ioctl */
+ #include <sys/mount.h>
+diff --git a/grub-core/osdep/unix/getroot.c b/grub-core/osdep/unix/getroot.c
+index 1079a91..4bf37b0 100644
+--- a/grub-core/osdep/unix/getroot.c
++++ b/grub-core/osdep/unix/getroot.c
+@@ -51,8 +51,10 @@
+ #endif
+ 
+ #include <sys/types.h>
+-#if defined(HAVE_SYS_MKDEV_H)
++#if defined(MAJOR_IN_MKDEV)
+ #include <sys/mkdev.h>
++#elif defined(MAJOR_IN_SYSMACROS)
++#include <sys/sysmacros.h>
+ #endif
+ 
+ #if defined(HAVE_LIBZFS) && defined(HAVE_LIBNVPAIR)
+-- 
+2.8.1
+

diff --git a/sys-boot/grub/grub-2.02_beta3-r1.ebuild b/sys-boot/grub/grub-2.02_beta3-r1.ebuild
index 87d786d..43291a0 100644
--- a/sys-boot/grub/grub-2.02_beta3-r1.ebuild
+++ b/sys-boot/grub/grub-2.02_beta3-r1.ebuild
@@ -34,6 +34,7 @@ PATCHES=(
 	"${FILESDIR}"/gfxpayload.patch
 	"${FILESDIR}"/grub-2.02_beta2-KERNEL_GLOBS.patch
 	"${FILESDIR}"/2.02_beta3-10_linux-UUID.patch
+	"${FILESDIR}"/2.02_beta3-sysmacros.patch
 )
 
 DEJAVU=dejavu-sans-ttf-2.35


             reply	other threads:[~2016-04-24 15:30 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-24 15:30 Mike Gilbert [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-04-11 19:40 [gentoo-commits] repo/gentoo:master commit in: sys-boot/grub/, sys-boot/grub/files/ Mike Gilbert
2023-07-11 14:25 Mike Gilbert
2023-05-09 20:23 Mike Gilbert
2023-02-13 16:47 Mike Gilbert
2023-01-17 16:03 Mike Gilbert
2023-01-17 16:03 Mike Gilbert
2022-09-16 23:10 Mike Gilbert
2021-09-07 17:28 Mike Gilbert
2021-03-14 18:36 Mike Gilbert
2020-03-15 18:34 Mike Gilbert
2019-07-23 13:21 Mike Gilbert
2019-06-24 18:34 Mike Gilbert
2018-09-01 22:07 Thomas Deutschmann
2018-06-26 14:45 Mike Gilbert
2018-05-04 16:28 Mike Gilbert
2018-04-01 18:18 Mike Gilbert
2016-10-05 14:22 Mike Gilbert
2016-05-21 18:19 Magnus Granberg
2016-03-05 22:36 Mike Gilbert
2015-12-15 18:30 Mike Gilbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1461511822.8fa466c0ac9da67c50cb8400197c37d0a5fef33b.floppym@gentoo \
    --to=floppym@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox