Fix various build problems on GNU/Hurd.

* grub-core/osdep/unix/getroot.c (strip_extra_slashes): Move inside
!defined (__GNU__).
(xgetcwd): Likewise.
* include/grub/emu/hostdisk.h (grub_util_hurd_get_disk_info)
[__GNU__]: Add prototype.
* util/getroot.c (grub_util_biosdisk_get_grub_dev) [__GNU__]: Format
long int using %ld rather than %d.
This commit is contained in:
Colin Watson 2013-12-20 14:02:27 +00:00
parent 2fa5a58ca3
commit 3bc1b2daab
4 changed files with 21 additions and 3 deletions

View file

@ -1,3 +1,15 @@
2013-12-20 Colin Watson <cjwatson@ubuntu.com>
Fix various build problems on GNU/Hurd.
* grub-core/osdep/unix/getroot.c (strip_extra_slashes): Move inside
!defined (__GNU__).
(xgetcwd): Likewise.
* include/grub/emu/hostdisk.h (grub_util_hurd_get_disk_info)
[__GNU__]: Add prototype.
* util/getroot.c (grub_util_biosdisk_get_grub_dev) [__GNU__]: Format
long int using %ld rather than %d.
2013-12-18 Vladimir Serbinenko <phcoder@gmail.com> 2013-12-18 Vladimir Serbinenko <phcoder@gmail.com>
* configure.ac: Set version to 2.02~beta1. * configure.ac: Set version to 2.02~beta1.

View file

@ -116,6 +116,7 @@
#include <sys/mount.h> #include <sys/mount.h>
#endif #endif
#if !defined (__GNU__)
static void static void
strip_extra_slashes (char *dir) strip_extra_slashes (char *dir)
{ {
@ -155,7 +156,6 @@ xgetcwd (void)
return path; return path;
} }
#if !defined (__GNU__)
char ** char **
grub_util_find_root_devices_from_poolname (char *poolname) grub_util_find_root_devices_from_poolname (char *poolname)
{ {

View file

@ -75,6 +75,12 @@ grub_hostdisk_find_partition_start_os (const char *dev);
void void
grub_hostdisk_flush_initial_buffer (const char *os_dev); grub_hostdisk_flush_initial_buffer (const char *os_dev);
#ifdef __GNU__
int
grub_util_hurd_get_disk_info (const char *dev, grub_uint32_t *secsize, grub_disk_addr_t *offset,
grub_disk_addr_t *size, char **parent);
#endif
struct grub_util_hostdisk_data struct grub_util_hostdisk_data
{ {
char *dev; char *dev;

View file

@ -363,9 +363,9 @@ grub_util_biosdisk_get_grub_dev (const char *os_dev)
char *t; char *t;
t = dri; t = dri;
if (*q >= 'a' && *q <= 'g') if (*q >= 'a' && *q <= 'g')
dri = xasprintf ("%s,%d,%d", t, n, *q - 'a' + 1); dri = xasprintf ("%s,%ld,%d", t, n, *q - 'a' + 1);
else else
dri = xasprintf ("%s,%d", t, n); dri = xasprintf ("%s,%ld", t, n);
free (t); free (t);
} }
} }