void-packages/srcpkgs/grub/patches/musl.patch

35 lines
1.3 KiB
Diff

--- grub-core/kern/emu/misc.c.orig 2015-12-18 15:48:01.279947005 +0100
+++ grub-core/kern/emu/misc.c 2015-12-18 15:48:54.974805473 +0100
@@ -20,7 +20,9 @@
#include <config.h>
#include <errno.h>
+#ifdef __GLIBC__
#include <error.h>
+#endif
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
--- grub-core/osdep/unix/hostdisk.c.orig 2015-12-18 15:50:27.584565696 +0100
+++ grub-core/osdep/unix/hostdisk.c 2015-12-18 15:51:43.424369339 +0100
@@ -48,8 +48,7 @@
#ifdef __linux__
# include <sys/ioctl.h> /* ioctl */
# include <sys/mount.h>
-# if !defined(__GLIBC__) || \
- ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1)))
+#if ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1)))
/* Maybe libc doesn't have large file support. */
# include <linux/unistd.h> /* _llseek */
# endif /* (GLIBC < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR < 1)) */
@@ -79,8 +78,7 @@ grub_util_get_fd_size (grub_util_fd_t fd
return st.st_size;
}
-#if defined(__linux__) && (!defined(__GLIBC__) || \
- ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1))))
+#if (defined(__linux__) && defined(__GLIBC__)) && (((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1))))
/* Maybe libc doesn't have large file support. */
int
grub_util_fd_seek (grub_util_fd_t fd, grub_uint64_t off)