* Cherry-pick from upstream:

- Fix FreeBSD compilation problem.
This commit is contained in:
Colin Watson 2011-03-29 15:13:25 +01:00
parent d1d53f2bf8
commit 33256d0192
4 changed files with 31 additions and 4 deletions

7
debian/changelog vendored
View File

@ -1,3 +1,10 @@
grub2 (1.99~rc1-8) UNRELEASED; urgency=low
* Cherry-pick from upstream:
- Fix FreeBSD compilation problem.
-- Colin Watson <cjwatson@debian.org> Tue, 29 Mar 2011 15:12:40 +0100
grub2 (1.99~rc1-7) unstable; urgency=low
* Add /proc/mdstat, LVM information, and listings of /dev/disk/by-id/ and

View File

@ -0,0 +1,19 @@
Description: Fix FreeBSD compilation problem
Author: Vladimir Serbinenko <phcoder@gmail.com>
Forwarded: yes
Applied-Upstream: http://bazaar.launchpad.net/~vcs-imports/grub/grub2-bzr/revision/3117
Last-Update: 2011-03-29
Index: b/grub-core/kern/emu/hostdisk.c
===================================================================
--- a/grub-core/kern/emu/hostdisk.c
+++ b/grub-core/kern/emu/hostdisk.c
@@ -93,6 +93,8 @@
# include <sys/disk.h> /* DIOCGMEDIASIZE */
# include <sys/param.h>
# include <sys/sysctl.h>
+# define MAJOR(dev) major(dev)
+# define FLOPPY_MAJOR 2
#endif
#if defined(__APPLE__)

View File

@ -179,7 +179,7 @@ Index: b/grub-core/kern/emu/hostdisk.c
===================================================================
--- a/grub-core/kern/emu/hostdisk.c
+++ b/grub-core/kern/emu/hostdisk.c
@@ -103,7 +103,9 @@
@@ -105,7 +105,9 @@
# include <libdevmapper.h>
#endif
@ -190,7 +190,7 @@ Index: b/grub-core/kern/emu/hostdisk.c
# define HAVE_DIOCGDINFO
# include <sys/ioctl.h>
# include <sys/disklabel.h> /* struct disklabel */
@@ -343,7 +345,68 @@
@@ -345,7 +347,68 @@
#endif /* HAVE_DEVICE_MAPPER */
}
@ -260,7 +260,7 @@ Index: b/grub-core/kern/emu/hostdisk.c
static grub_disk_addr_t
find_partition_start (const char *dev)
{
@@ -1380,7 +1443,17 @@
@@ -1382,7 +1445,17 @@
path[8] = 0;
return path;
@ -279,7 +279,7 @@ Index: b/grub-core/kern/emu/hostdisk.c
char *path = xstrdup (os_dev);
if (strncmp ("/dev/", path, 5) == 0)
{
@@ -1558,7 +1631,8 @@
@@ -1560,7 +1633,8 @@
#endif
return make_device_name (drive, -1, -1);

View File

@ -22,6 +22,7 @@ lnxboot_grub.patch
normal_menu_line_alloc.patch
freebsd_module_header_alloc.patch
video_fb_pageflip.patch
freebsd_definitions.patch
kfreebsd_libgeom.patch
copy_partition_table.patch
ext2_overflow.patch