Revision dd6e957a

b/linux-user/syscall.c
4606 4606
#undef STRUCT
4607 4607
#undef STRUCT_SPECIAL
4608 4608

  
4609
    /* Build target_to_host_errno_table[] table from
4610
     * host_to_target_errno_table[]. */
4611
    for (i = 0; i < ERRNO_TABLE_SIZE; i++) {
4612
        target_to_host_errno_table[host_to_target_errno_table[i]] = i;
4613
    }
4614

  
4609 4615
    /* we patch the ioctl size if necessary. We rely on the fact that
4610 4616
       no ioctl has all the bits at '1' in the size field */
4611 4617
    ie = ioctl_entries;
......
4625 4631
                (size << TARGET_IOC_SIZESHIFT);
4626 4632
        }
4627 4633

  
4628
        /* Build target_to_host_errno_table[] table from
4629
         * host_to_target_errno_table[]. */
4630
        for (i=0; i < ERRNO_TABLE_SIZE; i++)
4631
                target_to_host_errno_table[host_to_target_errno_table[i]] = i;
4632

  
4633 4634
        /* automatic consistency check if same arch */
4634 4635
#if (defined(__i386__) && defined(TARGET_I386) && defined(TARGET_ABI32)) || \
4635 4636
    (defined(__x86_64__) && defined(TARGET_X86_64))

Also available in: Unified diff