Blame SOURCES/0499-safemath-add-grub_cast-for-gcc-5.1.patch
|
|
351970 |
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
351970 |
From: Nicolas Frayer <nfrayer@redhat.com>
|
|
|
351970 |
Date: Wed, 31 Jan 2024 15:36:09 +0100
|
|
|
351970 |
Subject: [PATCH] safemath: add grub_cast for gcc < 5.1
|
|
|
351970 |
|
|
|
351970 |
Signed-off-by: Nicolas Frayer <nfrayer@redhat.com>
|
|
|
351970 |
---
|
|
|
351970 |
include/grub/safemath.h | 2 ++
|
|
|
351970 |
1 file changed, 2 insertions(+)
|
|
|
351970 |
|
|
|
351970 |
diff --git a/include/grub/safemath.h b/include/grub/safemath.h
|
|
|
351970 |
index 30800ad6a141..f7392469739f 100644
|
|
|
351970 |
--- a/include/grub/safemath.h
|
|
|
351970 |
+++ b/include/grub/safemath.h
|
|
|
351970 |
@@ -151,6 +151,8 @@
|
|
|
351970 |
__signed_mul_overflow(a, b, d), \
|
|
|
351970 |
__unsigned_mul_overflow(a, b, d))
|
|
|
351970 |
|
|
|
351970 |
+#define grub_cast(a, res) grub_add ((a), 0, (res))
|
|
|
351970 |
+
|
|
|
351970 |
#endif
|
|
|
351970 |
|
|
|
351970 |
#endif /* GRUB_SAFEMATH_H */
|