From 88eb9291fc0b866f0b5e81e63ef8c83022c3d7b2 Mon Sep 17 00:00:00 2001 From: Mark Cave-Ayland Date: Tue, 8 Feb 2022 22:10:11 +0000 Subject: 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 --- arch/unix/unix.c | 2 ++ 1 file changed, 2 insertions(+) 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) { -- cgit v1.2.1