X-Git-Url: http://git.samba.org/samba.git/?p=sfrench%2Fcifs-2.6.git;a=blobdiff_plain;f=scripts%2Fmod%2Ffile2alias.c;h=348d8687b7c9cad167c6d631ce9e5f1c2038bdf0;hp=9ddf944cce290b7d38fc2982b852bc93d4c50001;hb=4ce6efed48d736e3384c39ff87bda723e1f8e041;hpb=d2532dd20a126020de407c1c2476a75b53fce7ac diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index 9ddf944cce29..348d8687b7c9 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 "