chendongqi c22c377b98 CentOS 8: Upgrade parted to version 3.2.36
(1)Release Version Upgrade

(2)Matching code changes with el7 to el8

(3)Delete redundant patches
The patch contents have been fixed in the upstream package(el8)

(4)Modify compilation problem
Add 0001-fix-disable-device-mapper-build-error.patch,
fix-disable-device-mapper-build-error.patch,
fix "DM" undeclared compilation problems after adding "--disable-device-mapper".
Refer to an upstream patch correction.
http://git.savannah.gnu.org/cgit/parted.git/commit/?id=7e87ca3c531228d35e13e802d2622006138b104c

Story: 2006729
Task: 37658
Depends-On: https://review.opendev.org/#/c/696481/
Depends-On: https://review.opendev.org/#/c/696050/
Change-Id: I0cb1b36cb899ef549430e42a9ba741723cdae781
Signed-off-by: Dongqi Chen <chen.dq@neusoft.com>
2019-12-20 08:25:32 +00:00

54 lines
1.6 KiB
Diff

From 0da33d97a8c20125922b5967988a2849d801ca0c Mon Sep 17 00:00:00 2001
From: Allain Legacy <allain.legacy@windriver.com>
Date: Fri, 28 Sep 2018 02:28:30 +0800
Subject:
Signed-off-by: Dongqi Chen <chen.dq@neusoft.com>
---
libparted/arch/linux.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
index 6e78faf..27f706b 100644
--- a/libparted/arch/linux.c
+++ b/libparted/arch/linux.c
@@ -1771,12 +1771,14 @@ _device_close (PedDevice* dev)
#if SIZEOF_OFF_T < 8
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
static _syscall5(int,_llseek,
unsigned int, fd,
unsigned long, offset_high,
unsigned long, offset_low,
loff_t*, result,
unsigned int, origin)
+#endif
loff_t
llseek (unsigned int fd, loff_t offset, unsigned int whence)
@@ -1784,11 +1786,20 @@ llseek (unsigned int fd, loff_t offset, unsigned int whence)
loff_t result;
int retval;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
retval = _llseek(fd,
((unsigned long long)offset) >> 32,
((unsigned long long)offset) & 0xffffffff,
&result,
whence);
+#else
+ retval = syscall(__NR__llseek, fd,
+ ((unsigned long long)offset) >> 32,
+ ((unsigned long long)offset) & 0xffffffff,
+ &result,
+ whence);
+#endif
+
return (retval==-1 ? (loff_t) retval : result);
}
--
1.8.3.1