8ed9d76c3649f0bda953d586e33e9b98ecfb84fb
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / boot / grub / grub.300-honor_UCLIBC_HAS_LFS.patch
1 Index: b/grub/asmstub.c
2 ===================================================================
3 --- a/grub/asmstub.c
4 +++ b/grub/asmstub.c
5 @@ -18,10 +18,13 @@
6   *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
7   */
8  
9 +#include <features.h>
10 +#if !defined __UCLIBC__ || (defined __UCLIBC__ && defined __UCLIBC_HAS_LFS__)
11  /* Try to use glibc's transparant LFS support. */
12  #define _LARGEFILE_SOURCE      1
13  /* lseek becomes synonymous with lseek64.  */
14  #define _FILE_OFFSET_BITS      64
15 +#endif
16  
17  /* Simulator entry point. */
18  int grub_stage2 (void);
19 Index: b/lib/device.c
20 ===================================================================
21 --- a/lib/device.c
22 +++ b/lib/device.c
23 @@ -18,10 +18,13 @@
24   *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25   */
26  
27 +#include <features.h>
28 +#if !defined __UCLIBC__ || (defined __UCLIBC__ && defined __UCLIBC_HAS_LFS__)
29  /* Try to use glibc's transparant LFS support. */
30  #define _LARGEFILE_SOURCE       1
31  /* lseek becomes synonymous with lseek64.  */
32  #define _FILE_OFFSET_BITS       64
33 +#endif
34  
35  #include <stdio.h>
36  #include <stdlib.h>