From: Tom Enderes <[email protected]>
The kernel build failed on cygwin hosts, because cygwin has slightly
different typedefs compared to linux:
scripts/mod/file2alias.c:518: error: dereferencing pointer to incomplete
type
Two files, scripts/mod/file2alias.c and scripts/mod/modpost.h, were
modified as follows:
Whever __CYGWIN__ is defined, __uint32 is defined as __uint32_t (instead
of uint_32_t) and the missing ElfxxSection definitions are added.
These changes have been tested both on cygwin 1.5.24, hostcc=gcc 3.4.4
and on FC5, hostcc=gcc 4.1.1-1. Any tests on cygwin, with and without
this change, were executed with the following set for make:
HOST_LOADLIBES="-lcurses -lintl".
Signed-off-by: Tom Enderes <[email protected]>
diff -Naur -r o21.1/scripts/mod/file2alias.c
2.6.21.1/scripts/mod/file2alias.c
--- o21.1/scripts/mod/file2alias.c 2007-04-27 14:49:26.000000000 -0700
+++ 2.6.21.1/scripts/mod/file2alias.c 2007-05-29 20:35:01.209115300
-0700
@@ -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 -Naur -r o21.1/scripts/mod/modpost.h 2.6.21.1/scripts/mod/modpost.h
--- o21.1/scripts/mod/modpost.h 2007-04-27 14:49:26.000000000 -0700
+++ 2.6.21.1/scripts/mod/modpost.h 2007-05-29 20:35:01.599732800
-0700
@@ -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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]