From db5aa5e5d8932c73f1b9f01fe567fa343898b825 Mon Sep 17 00:00:00 2001
From: chanthmiao <chanthmiao@outlook.com>
Date: Sun, 5 Dec 2021 16:58:17 +0800
Subject: [PATCH] Fix integer overflow for alpha like linux

---
 sys-utils/swapon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-utils/swapon.c b/sys-utils/swapon.c
index ed6be244ec..76c5cac51b 100644
--- a/sys-utils/swapon.c
+++ b/sys-utils/swapon.c
@@ -543,7 +543,7 @@ static int swapon_checks(const struct swapon_ctl *ctl, struct swap_device *dev)
 
 	/* test for holes by LBT */
 	if (S_ISREG(st.st_mode)) {
-		if (st.st_blocks * 512 < st.st_size) {
+		if (st.st_blocks * 512L < st.st_size) {
 			warnx(_("%s: skipping - it appears to have holes."),
 				dev->path);
 			goto err;
