render / rpms / qemu

Forked from rpms/qemu 9 months ago
Clone

Blame 0003-target-xtensa-fix-missing-errno-codes-for-mingw32.patch

5544c1
From 33e25a4a6c6dc7632b15ee50637d33b4c3cf729e Mon Sep 17 00:00:00 2001
5544c1
From: Max Filippov <jcmvbkbc@gmail.com>
5544c1
Date: Thu, 6 Sep 2012 04:36:46 +0400
5544c1
Subject: [PATCH] target-xtensa: fix missing errno codes for mingw32
5544c1
5544c1
Put the following errno value mappings under #ifdef:
5544c1
5544c1
xtensa-semi.c: In function 'errno_h2g':
5544c1
xtensa-semi.c:113: error: 'ENOTBLK' undeclared (first use in this function)
5544c1
xtensa-semi.c:113: error: (Each undeclared identifier is reported only once
5544c1
xtensa-semi.c:113: error: for each function it appears in.)
5544c1
xtensa-semi.c:113: error: array index in initializer not of integer type
5544c1
xtensa-semi.c:113: error: (near initialization for 'guest_errno')
5544c1
xtensa-semi.c:124: error: 'ETXTBSY' undeclared (first use in this function)
5544c1
xtensa-semi.c:124: error: array index in initializer not of integer type
5544c1
xtensa-semi.c:124: error: (near initialization for 'guest_errno')
5544c1
xtensa-semi.c:134: error: 'ELOOP' undeclared (first use in this function)
5544c1
xtensa-semi.c:134: error: array index in initializer not of integer type
5544c1
xtensa-semi.c:134: error: (near initialization for 'guest_errno')
5544c1
5544c1
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
5544c1
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
5544c1
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
5544c1
---
5544c1
 target-xtensa/xtensa-semi.c | 6 ++++++
5544c1
 1 file changed, 6 insertions(+)
5544c1
5544c1
diff --git a/target-xtensa/xtensa-semi.c b/target-xtensa/xtensa-semi.c
5544c1
index e745bef..52be07a 100644
5544c1
--- a/target-xtensa/xtensa-semi.c
5544c1
+++ b/target-xtensa/xtensa-semi.c
5544c1
@@ -110,7 +110,9 @@ static uint32_t errno_h2g(int host_errno)
5544c1
         [ENOMEM]        = TARGET_ENOMEM,
5544c1
         [EACCES]        = TARGET_EACCES,
5544c1
         [EFAULT]        = TARGET_EFAULT,
5544c1
+#ifdef ENOTBLK
5544c1
         [ENOTBLK]       = TARGET_ENOTBLK,
5544c1
+#endif
5544c1
         [EBUSY]         = TARGET_EBUSY,
5544c1
         [EEXIST]        = TARGET_EEXIST,
5544c1
         [EXDEV]         = TARGET_EXDEV,
5544c1
@@ -121,7 +123,9 @@ static uint32_t errno_h2g(int host_errno)
5544c1
         [ENFILE]        = TARGET_ENFILE,
5544c1
         [EMFILE]        = TARGET_EMFILE,
5544c1
         [ENOTTY]        = TARGET_ENOTTY,
5544c1
+#ifdef ETXTBSY
5544c1
         [ETXTBSY]       = TARGET_ETXTBSY,
5544c1
+#endif
5544c1
         [EFBIG]         = TARGET_EFBIG,
5544c1
         [ENOSPC]        = TARGET_ENOSPC,
5544c1
         [ESPIPE]        = TARGET_ESPIPE,
5544c1
@@ -131,7 +135,9 @@ static uint32_t errno_h2g(int host_errno)
5544c1
         [EDOM]          = TARGET_EDOM,
5544c1
         [ERANGE]        = TARGET_ERANGE,
5544c1
         [ENOSYS]        = TARGET_ENOSYS,
5544c1
+#ifdef ELOOP
5544c1
         [ELOOP]         = TARGET_ELOOP,
5544c1
+#endif
5544c1
     };
5544c1
 
5544c1
     if (host_errno == 0) {
5544c1
-- 
5544c1
1.7.12.1
5544c1