git: 5360d017be83 - main - loader: Fix G overflowing for G(4) on 32-bit builds

From: Warner Losh <imp_at_FreeBSD.org>
Date: Wed, 29 May 2024 14:39:11 UTC
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=5360d017be83d2502ba262f391ef45b07e0de680

commit 5360d017be83d2502ba262f391ef45b07e0de680
Author:     Ahmad Khalifa <ahmadkhalifa570@gmail.com>
AuthorDate: 2024-05-29 14:30:59 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2024-05-29 14:37:17 +0000

    loader: Fix G overflowing for G(4) on 32-bit builds
    
    Prevent G(4) and over from overflowing for 32-bit builds.
    
    Reviewed by: imp
    Pull Request: https://github.com/freebsd/freebsd-src/pull/1098
---
 stand/efi/loader/copy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/stand/efi/loader/copy.c b/stand/efi/loader/copy.c
index 3f2d1c6c20b0..a0aea9823632 100644
--- a/stand/efi/loader/copy.c
+++ b/stand/efi/loader/copy.c
@@ -36,7 +36,7 @@
 #include "loader_efi.h"
 
 #define	M(x)	((x) * 1024 * 1024)
-#define	G(x)	(1UL * (x) * 1024 * 1024 * 1024)
+#define	G(x)	(1ULL * (x) * 1024 * 1024 * 1024)
 
 #if defined(__amd64__)
 #include <machine/cpufunc.h>