diff options
author | Paul Mackerras <paulus@samba.org> | 2008-03-26 08:44:18 +1100 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-03-26 08:44:18 +1100 |
commit | 54f53f2b94feb72622bec7a8563fc487d9f97720 (patch) | |
tree | ab0c4e1dcadd25a00fa7a4febf41bc43b864cf73 /scripts/mod/file2alias.c | |
parent | f61fb8a52cdf8b9b6a6badde84aefe58cb35d315 (diff) | |
parent | a4083c9271e0a697278e089f2c0b9a95363ada0a (diff) |
Merge branch 'linux-2.6'
Diffstat (limited to 'scripts/mod/file2alias.c')
-rw-r--r-- | scripts/mod/file2alias.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index 9ddf944cce2..348d8687b7c 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c @@ -51,11 +51,13 @@ do { \ sprintf(str + strlen(str), "*"); \ } while(0) +unsigned int cross_build = 0; /** * Check that sizeof(device_id type) are consistent with size of section * in .o file. If in-consistent then userspace and kernel does not agree * on actual size which is a bug. * Also verify that the final entry in the table is all zeros. + * Ignore both checks if build host differ from target host and size differs. **/ static void device_id_check(const char *modname, const char *device_id, unsigned long size, unsigned long id_size, @@ -64,6 +66,8 @@ static void device_id_check(const char *modname, const char *device_id, int i; if (size % id_size || size < id_size) { + if (cross_build != 0) + return; fatal("%s: sizeof(struct %s_device_id)=%lu is not a modulo " "of the size of section __mod_%s_device_table=%lu.\n" "Fix definition of struct %s_device_id " |