From 93efbe13bb71b0ec51cdcda2119711250227b727 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Sutre?= Date: Wed, 16 Dec 2009 18:14:30 +0000 Subject: [PATCH] Less intrusive patch for fixing conflict with UNUSED macro. --- grub2/README.patches | 4 ++-- grub2/distinfo | 4 ++-- grub2/patches/patch-ab | 34 ++++++++++++++++++++-------------- 3 files changed, 24 insertions(+), 18 deletions(-) diff --git a/grub2/README.patches b/grub2/README.patches index 339f688699..fa07d310fc 100644 --- a/grub2/README.patches +++ b/grub2/README.patches @@ -5,8 +5,8 @@ standard distribution: . minor fix for compatibility with pkgsrc's cc wrapper (massaging of -Wl). - util/deviceiter.c - . inclusion of disabled on NetBSD, due to a conflict on - the `UNUSED' macro. + . moved the inclusion of local header files after , as + otherwise there is a conflict on NetBSD with the `UNUSED' macro. - Makefile . $(sysconfdir)/grub.d replaced with $(EGDIR). diff --git a/grub2/distinfo b/grub2/distinfo index 1fbdd06966..080dd60db1 100644 --- a/grub2/distinfo +++ b/grub2/distinfo @@ -1,10 +1,10 @@ -$NetBSD: distinfo,v 1.12 2009/12/16 14:37:31 gregoire Exp $ +$NetBSD: distinfo,v 1.13 2009/12/16 18:14:30 gregoire Exp $ SHA1 (grub-1.97.1.tar.gz) = a8465fc16ef5d082a43df0f8e7caeea01db0c515 RMD160 (grub-1.97.1.tar.gz) = 3f0036add7298bfd1bb2dcd963671bbeea136c3c Size (grub-1.97.1.tar.gz) = 1242959 bytes SHA1 (patch-aa) = 92435d458d9b94cec531575240efcf6c5db4de80 -SHA1 (patch-ab) = 89336dba1f7c6a5a30fd7dcb2a78caeb512956d1 +SHA1 (patch-ab) = 4a69c597a8890274d1c7f88ac3ae60e939677e96 SHA1 (patch-ac) = 87de2d112e35710d250ade4e0f514441a34d8a23 SHA1 (patch-ad) = 59e143eeac54494b4071ae42afd438bf7eea5552 SHA1 (patch-ae) = 57b78a9bcd6f83386e542997ad89d88f3f42db01 diff --git a/grub2/patches/patch-ab b/grub2/patches/patch-ab index bcad2cd5cb..3a45dec342 100644 --- a/grub2/patches/patch-ab +++ b/grub2/patches/patch-ab @@ -1,18 +1,24 @@ -$NetBSD: patch-ab,v 1.10 2009/12/16 14:37:31 gregoire Exp $ +$NetBSD: patch-ab,v 1.11 2009/12/16 18:14:30 gregoire Exp $ --- util/deviceiter.c.orig 2009-11-09 16:48:16.000000000 +0100 +++ util/deviceiter.c -@@ -111,7 +111,12 @@ get_kfreebsd_version (void) +@@ -29,9 +29,6 @@ + #include + #include - #if defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) - # include /* ioctl */ --# include -+ /* the preprocessor macro `UNUSED', which is defined in grub/types.h, -+ conflicts with NetBSD's sys/disklabel.h, where the word `UNUSED' -+ appears. */ -+# if !defined(__NetBSD__) -+# include -+# endif - # include /* CDIOCCLRDEBUG */ - # if defined(__FreeBSD_kernel__) - # include +-#include +-#include +- + #ifdef __linux__ + # if !defined(__GLIBC__) || \ + ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1))) +@@ -135,6 +132,9 @@ have_devfs (void) + } + #endif /* __linux__ */ + ++#include ++#include ++ + /* These three functions are quite different among OSes. */ + static void + get_floppy_disk_name (char *name, int unit)