firmware-utils/mktplinfw: use htonl/ntohl
[openwrt.git] / package / grub / patches / 200-darwin_fixes.patch
1 --- a/stage2/asm.S
2 +++ b/stage2/asm.S
3 @@ -95,14 +95,16 @@ VARIABLE(stage2_id)
4 VARIABLE(force_lba)
5 .byte 0
6 VARIABLE(version_string)
7 - .string VERSION
8 + .ascii VERSION
9 + .byte 0
10 VARIABLE(config_file)
11 #ifndef STAGE1_5
12 - .string "/boot/grub/menu.lst"
13 + .ascii "/boot/grub/menu.lst"
14 #else /* STAGE1_5 */
15 .long 0xffffffff
16 - .string "/boot/grub/stage2"
17 + .ascii "/boot/grub/stage2"
18 #endif /* STAGE1_5 */
19 + .byte 0
20
21 /*
22 * Leave some breathing room for the config file name.
23 @@ -762,7 +764,9 @@ ENTRY(chain_stage1)
24 call EXT_C(prot_to_real)
25 .code16
26
27 -#ifdef ABSOLUTE_WITHOUT_ASTERISK
28 +#ifdef __APPLE__
29 + DATA32 ADDR32 ljmp offset
30 +#elif defined(ABSOLUTE_WITHOUT_ASTERISK)
31 DATA32 ADDR32 ljmp (offset)
32 #else
33 DATA32 ADDR32 ljmp *(offset)
34 --- a/stage2/char_io.c
35 +++ b/stage2/char_io.c
36 @@ -1345,5 +1345,12 @@ grub_strcpy (char *dest, const char *src
37 #ifndef GRUB_UTIL
38 # undef memcpy
39 /* GCC emits references to memcpy() for struct copies etc. */
40 +#ifdef __APPLE__
41 +void *memcpy (void *dest, const void *src, int n)
42 +{
43 + return grub_memmove(dest, src, n);
44 +}
45 +#else
46 void *memcpy (void *dest, const void *src, int n) __attribute__ ((alias ("grub_memmove")));
47 #endif
48 +#endif
This page took 0.0474 seconds and 5 git commands to generate.