summaryrefslogtreecommitdiff
path: root/target/linux/patches/2.6.29.1/cygwin-compat.patch
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2009-06-13 17:17:14 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2009-06-13 17:17:14 +0200
commitb448bbcdab09b70b4d03ea0bc9167878e7f054da (patch)
tree40ea72e4979ce176f6280b25368713122bee1b9c /target/linux/patches/2.6.29.1/cygwin-compat.patch
parentd804be5baee6590ff6e91d267c8cb9933ed7ac60 (diff)
parentd2e5a673aa7637c990ca7307e831327eb67e3fe7 (diff)
Merge branch 'master' of ssh://openadk.org/git/openadk
Diffstat (limited to 'target/linux/patches/2.6.29.1/cygwin-compat.patch')
-rw-r--r--target/linux/patches/2.6.29.1/cygwin-compat.patch66
1 files changed, 66 insertions, 0 deletions
diff --git a/target/linux/patches/2.6.29.1/cygwin-compat.patch b/target/linux/patches/2.6.29.1/cygwin-compat.patch
new file mode 100644
index 000000000..453748618
--- /dev/null
+++ b/target/linux/patches/2.6.29.1/cygwin-compat.patch
@@ -0,0 +1,66 @@
+diff -Nur linux-2.6.29.1.orig/scripts/mod/file2alias.c linux-2.6.29.1/scripts/mod/file2alias.c
+--- linux-2.6.29.1.orig/scripts/mod/file2alias.c 2009-04-02 22:55:27.000000000 +0200
++++ linux-2.6.29.1/scripts/mod/file2alias.c 2009-05-06 19:05:47.367234820 +0200
+@@ -29,7 +29,11 @@
+
+ #include <ctype.h>
+
++#ifdef __CYGWIN__
++typedef __uint32_t __u32;
++#else
+ typedef uint32_t __u32;
++#endif
+ typedef uint16_t __u16;
+ typedef unsigned char __u8;
+
+diff -Nur linux-2.6.29.1.orig/scripts/mod/modpost.h linux-2.6.29.1/scripts/mod/modpost.h
+--- linux-2.6.29.1.orig/scripts/mod/modpost.h 2009-04-02 22:55:27.000000000 +0200
++++ linux-2.6.29.1/scripts/mod/modpost.h 2009-05-06 19:06:14.068903184 +0200
+@@ -9,6 +9,11 @@
+ #include <unistd.h>
+ #include <elf.h>
+
++#ifdef __CYGWIN__
++typedef uint16_t Elf32_Section;
++typedef uint16_t Elf64_Section;
++#endif
++
+ #include "elfconfig.h"
+
+ #if KERNEL_ELFCLASS == ELFCLASS32
+@@ -19,13 +24,17 @@
+ #define Elf_Addr Elf32_Addr
+ #define Elf_Sword Elf64_Sword
+ #define Elf_Section Elf32_Half
++#ifndef __CYGWIN__
+ #define ELF_ST_BIND ELF32_ST_BIND
+ #define ELF_ST_TYPE ELF32_ST_TYPE
++#endif
+
+ #define Elf_Rel Elf32_Rel
+ #define Elf_Rela Elf32_Rela
++#ifndef __CYGWIN__
+ #define ELF_R_SYM ELF32_R_SYM
+ #define ELF_R_TYPE ELF32_R_TYPE
++#endif
+ #else
+
+ #define Elf_Ehdr Elf64_Ehdr
+@@ -43,6 +52,17 @@
+ #define ELF_R_TYPE ELF64_R_TYPE
+ #endif
+
++#define R_386_32 1 /* Direct 32 bit */
++#define R_386_PC32 2 /* PC relative 32 bit */
++
++#define R_ARM_PC24 1 /* PC relative 26 bit branch */
++#define R_ARM_ABS32 2 /* Direct 32 bit */
++
++#define R_MIPS_32 2 /* Direct 32 bit */
++#define R_MIPS_26 4 /* Direct 26 bit shifted */
++#define R_MIPS_HI16 5 /* High 16 bit */
++#define R_MIPS_LO16 6 /* Low 16 bit */
++
+ /* The 64-bit MIPS ELF ABI uses an unusual reloc format. */
+ typedef struct
+ {