target-xtensa: fix missing errno codes for mingw32
Put the following errno value mappings under #ifdef: xtensa-semi.c: In function 'errno_h2g': xtensa-semi.c:113: error: 'ENOTBLK' undeclared (first use in this function) xtensa-semi.c:113: error: (Each undeclared identifier is reported only once xtensa-semi.c:113: error: for each function it appears in.) xtensa-semi.c:113: error: array index in initializer not of integer type xtensa-semi.c:113: error: (near initialization for 'guest_errno') xtensa-semi.c:124: error: 'ETXTBSY' undeclared (first use in this function) xtensa-semi.c:124: error: array index in initializer not of integer type xtensa-semi.c:124: error: (near initialization for 'guest_errno') xtensa-semi.c:134: error: 'ELOOP' undeclared (first use in this function) xtensa-semi.c:134: error: array index in initializer not of integer type xtensa-semi.c:134: error: (near initialization for 'guest_errno') Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
c001ed15f7
commit
c29b1bee4b
|
@ -110,7 +110,9 @@ static uint32_t errno_h2g(int host_errno)
|
||||||
[ENOMEM] = TARGET_ENOMEM,
|
[ENOMEM] = TARGET_ENOMEM,
|
||||||
[EACCES] = TARGET_EACCES,
|
[EACCES] = TARGET_EACCES,
|
||||||
[EFAULT] = TARGET_EFAULT,
|
[EFAULT] = TARGET_EFAULT,
|
||||||
|
#ifdef ENOTBLK
|
||||||
[ENOTBLK] = TARGET_ENOTBLK,
|
[ENOTBLK] = TARGET_ENOTBLK,
|
||||||
|
#endif
|
||||||
[EBUSY] = TARGET_EBUSY,
|
[EBUSY] = TARGET_EBUSY,
|
||||||
[EEXIST] = TARGET_EEXIST,
|
[EEXIST] = TARGET_EEXIST,
|
||||||
[EXDEV] = TARGET_EXDEV,
|
[EXDEV] = TARGET_EXDEV,
|
||||||
|
@ -121,7 +123,9 @@ static uint32_t errno_h2g(int host_errno)
|
||||||
[ENFILE] = TARGET_ENFILE,
|
[ENFILE] = TARGET_ENFILE,
|
||||||
[EMFILE] = TARGET_EMFILE,
|
[EMFILE] = TARGET_EMFILE,
|
||||||
[ENOTTY] = TARGET_ENOTTY,
|
[ENOTTY] = TARGET_ENOTTY,
|
||||||
|
#ifdef ETXTBSY
|
||||||
[ETXTBSY] = TARGET_ETXTBSY,
|
[ETXTBSY] = TARGET_ETXTBSY,
|
||||||
|
#endif
|
||||||
[EFBIG] = TARGET_EFBIG,
|
[EFBIG] = TARGET_EFBIG,
|
||||||
[ENOSPC] = TARGET_ENOSPC,
|
[ENOSPC] = TARGET_ENOSPC,
|
||||||
[ESPIPE] = TARGET_ESPIPE,
|
[ESPIPE] = TARGET_ESPIPE,
|
||||||
|
@ -131,7 +135,9 @@ static uint32_t errno_h2g(int host_errno)
|
||||||
[EDOM] = TARGET_EDOM,
|
[EDOM] = TARGET_EDOM,
|
||||||
[ERANGE] = TARGET_ERANGE,
|
[ERANGE] = TARGET_ERANGE,
|
||||||
[ENOSYS] = TARGET_ENOSYS,
|
[ENOSYS] = TARGET_ENOSYS,
|
||||||
|
#ifdef ELOOP
|
||||||
[ELOOP] = TARGET_ELOOP,
|
[ELOOP] = TARGET_ELOOP,
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
if (host_errno == 0) {
|
if (host_errno == 0) {
|
||||||
|
|
Loading…
Reference in a new issue