gnu-efi/0043-lfbgrid-Make-pointer-size-testing-not-arch-name-depe.patch
Peter Jones 1104109978 Make the gnu-efi Makefiles install some of our compat libs.
Signed-off-by: Peter Jones <pjones@redhat.com>
2020-01-24 16:37:19 -05:00

43 lines
1.3 KiB
Diff

From dba7d5eeb75c3e8526eaf6b898e3ba808dde5ac4 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Tue, 14 Jan 2020 10:13:30 -0500
Subject: [PATCH 43/45] lfbgrid: Make pointer size testing not arch name
dependent.
Signed-off-by: Peter Jones <pjones@redhat.com>
---
apps/lfbgrid.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/apps/lfbgrid.c b/apps/lfbgrid.c
index ac50f4eafa9..e9fef957d94 100644
--- a/apps/lfbgrid.c
+++ b/apps/lfbgrid.c
@@ -51,9 +51,9 @@ draw_boxes(EFI_GRAPHICS_OUTPUT_PROTOCOL *gop)
UINTN NumPixels;
UINT32 *PixelBuffer;
UINT32 CopySize, BufferSize;
-#if defined(__x86_64__) || defined(__aarch64__)
+#if __SIZEOF_POINTER__ == 8
UINT64 FrameBufferAddr;
-#elif defined(__i386__) || defined(__arm__)
+#elif __SIZEOF_POINTER__ == 4
UINT32 FrameBufferAddr;
#else
#error YOUR ARCH HERE
@@ -115,9 +115,9 @@ draw_boxes(EFI_GRAPHICS_OUTPUT_PROTOCOL *gop)
Print(L"No linear framebuffer on this device.\n");
return;
}
-#if defined(__x86_64__) || defined(__aarch64__)
+#if __SIZEOF_POINTER__ == 8
FrameBufferAddr = (UINT64)gop->Mode->FrameBufferBase;
-#elif defined(__i386__) || defined(__arm__)
+#elif __SIZEOF_POINTER__ == 4
FrameBufferAddr = (UINT32)(UINT64)gop->Mode->FrameBufferBase;
#else
#error YOUR ARCH HERE
--
2.24.1