]> review.fuel-infra Code Review - packages/centos6/qemu.git/blob - 0003-target-xtensa-fix-missing-errno-codes-for-mingw32.patch
Merge "Change requested in launchpad bug #1288352" into 5.0
[packages/centos6/qemu.git] / 0003-target-xtensa-fix-missing-errno-codes-for-mingw32.patch
1 From 33e25a4a6c6dc7632b15ee50637d33b4c3cf729e Mon Sep 17 00:00:00 2001
2 From: Max Filippov <jcmvbkbc@gmail.com>
3 Date: Thu, 6 Sep 2012 04:36:46 +0400
4 Subject: [PATCH] target-xtensa: fix missing errno codes for mingw32
5
6 Put the following errno value mappings under #ifdef:
7
8 xtensa-semi.c: In function 'errno_h2g':
9 xtensa-semi.c:113: error: 'ENOTBLK' undeclared (first use in this function)
10 xtensa-semi.c:113: error: (Each undeclared identifier is reported only once
11 xtensa-semi.c:113: error: for each function it appears in.)
12 xtensa-semi.c:113: error: array index in initializer not of integer type
13 xtensa-semi.c:113: error: (near initialization for 'guest_errno')
14 xtensa-semi.c:124: error: 'ETXTBSY' undeclared (first use in this function)
15 xtensa-semi.c:124: error: array index in initializer not of integer type
16 xtensa-semi.c:124: error: (near initialization for 'guest_errno')
17 xtensa-semi.c:134: error: 'ELOOP' undeclared (first use in this function)
18 xtensa-semi.c:134: error: array index in initializer not of integer type
19 xtensa-semi.c:134: error: (near initialization for 'guest_errno')
20
21 Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
22 Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
23 Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
24 ---
25  target-xtensa/xtensa-semi.c | 6 ++++++
26  1 file changed, 6 insertions(+)
27
28 diff --git a/target-xtensa/xtensa-semi.c b/target-xtensa/xtensa-semi.c
29 index e745bef..52be07a 100644
30 --- a/target-xtensa/xtensa-semi.c
31 +++ b/target-xtensa/xtensa-semi.c
32 @@ -110,7 +110,9 @@ static uint32_t errno_h2g(int host_errno)
33          [ENOMEM]        = TARGET_ENOMEM,
34          [EACCES]        = TARGET_EACCES,
35          [EFAULT]        = TARGET_EFAULT,
36 +#ifdef ENOTBLK
37          [ENOTBLK]       = TARGET_ENOTBLK,
38 +#endif
39          [EBUSY]         = TARGET_EBUSY,
40          [EEXIST]        = TARGET_EEXIST,
41          [EXDEV]         = TARGET_EXDEV,
42 @@ -121,7 +123,9 @@ static uint32_t errno_h2g(int host_errno)
43          [ENFILE]        = TARGET_ENFILE,
44          [EMFILE]        = TARGET_EMFILE,
45          [ENOTTY]        = TARGET_ENOTTY,
46 +#ifdef ETXTBSY
47          [ETXTBSY]       = TARGET_ETXTBSY,
48 +#endif
49          [EFBIG]         = TARGET_EFBIG,
50          [ENOSPC]        = TARGET_ENOSPC,
51          [ESPIPE]        = TARGET_ESPIPE,
52 @@ -131,7 +135,9 @@ static uint32_t errno_h2g(int host_errno)
53          [EDOM]          = TARGET_EDOM,
54          [ERANGE]        = TARGET_ERANGE,
55          [ENOSYS]        = TARGET_ENOSYS,
56 +#ifdef ELOOP
57          [ELOOP]         = TARGET_ELOOP,
58 +#endif
59      };
60  
61      if (host_errno == 0) {
62 -- 
63 1.7.12.1
64