]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Fix various build problems on GNU/Hurd.
authorColin Watson <cjwatson@ubuntu.com>
Fri, 20 Dec 2013 14:02:27 +0000 (14:02 +0000)
committerColin Watson <cjwatson@ubuntu.com>
Fri, 20 Dec 2013 14:02:27 +0000 (14:02 +0000)
* 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.

ChangeLog
grub-core/osdep/unix/getroot.c
include/grub/emu/hostdisk.h
util/getroot.c

index f7adf9bdff65594ba31d8bdaf44a0aa78aca3fea..724ac7cb99ebda636d434435c9d116305f1cc27c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
 
        * configure.ac: Set version to 2.02~beta1.
index 2604658447084552bb5b09fa08e402c8a7d70f85..3e40d994257feaa6a8f41801a62fb56a76dbb76f 100644 (file)
 #include <sys/mount.h>
 #endif
 
+#if !defined (__GNU__)
 static void
 strip_extra_slashes (char *dir)
 {
@@ -155,7 +156,6 @@ xgetcwd (void)
   return path;
 }
 
-#if !defined (__GNU__)
 char **
 grub_util_find_root_devices_from_poolname (char *poolname)
 {
index ba0034d5f77878fce7157c75074446ea2c17382a..8aa5403cd64edb6d5ee0a7d418a0cf6ce62836ef 100644 (file)
@@ -75,6 +75,12 @@ grub_hostdisk_find_partition_start_os (const char *dev);
 void
 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
 {
   char *dev;
index d71c9e858a7fd2d65257d38977474ff02b36b717..57162632caf537672a01c13f920e2280aa7ad6f2 100644 (file)
@@ -363,9 +363,9 @@ grub_util_biosdisk_get_grub_dev (const char *os_dev)
                char *t;
                t = dri;
                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
-                 dri = xasprintf ("%s,%d", t, n);
+                 dri = xasprintf ("%s,%ld", t, n);
                free (t);
              }
          }