summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2022-02-08 22:10:11 +0000
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2022-02-08 22:10:11 +0000
commit88eb9291fc0b866f0b5e81e63ef8c83022c3d7b2 (patch)
tree31ae328bb7c9c750b4ce068a5eda824b15338fa7
parentedd14f40ab3ccc585a6259dd990a07294596ca45 (diff)
downloadqemu-openbios-88eb9291fc0b866f0b5e81e63ef8c83022c3d7b2.tar.gz
arch/unix/unix.c: fix build on x86 architecture with modern gcc compilers
Modern gcc compilers will fail to build x86 OpenBIOS failing with the error message "libc/misc.c:20: multiple definition of `errno_int'" during link. Since the accompanying comment mentions that the reason for adding the definition is to allow compilation to succeed on OS X, surround it with suitable #if defined(__APPLE__) ... #endif guards. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
-rw-r--r--arch/unix/unix.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/unix/unix.c b/arch/unix/unix.c
index 1f628eb7..cb9757ed 100644
--- a/arch/unix/unix.c
+++ b/arch/unix/unix.c
@@ -68,7 +68,9 @@ static int verbose = 0;
unsigned long isa_io_base;
#endif
+#if defined(__APPLE__)
int errno_int; /* implement for fs drivers, needed to build on Mac OS X */
+#endif
ucell ofmem_claim(ucell addr, ucell size, ucell align)
{