Merge pull request #3086 from youknowone/x86

Fix x86 build
This commit is contained in:
Jeong YunWon authored and GitHub committed 2021-09-20 00:44:05 +09:00
commit fa55fd9a55
3 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -62,7 +62,7 @@ impl Fd {
cvt(unsafe { suppress_iph!(libc::close(self.0)) }, drop)
}
pub fn ftruncate(&self, len: i64) -> io::Result<()> {
pub fn ftruncate(&self, len: crate::stdlib::os::Offset) -> io::Result<()> {
cvt(unsafe { suppress_iph!(ftruncate(self.0, len)) }, drop)
}
+1 -1
View File
@@ -930,7 +930,7 @@ mod _io {
if !self.valid_write() || self.write_pos > self.pos {
self.write_pos = self.pos
}
self.adjust_position(self.pos + buf.len() as i64);
self.adjust_position(self.pos + buf.len() as Offset);
if self.pos > self.write_end {
self.write_end = self.pos
}
+2 -2
View File
@@ -514,7 +514,7 @@ mod _os {
#[pyarg(any)]
in_fd: i32,
#[pyarg(any)]
offset: i64,
offset: Offset,
#[pyarg(any)]
count: i64,
#[cfg(target_os = "macos")]
@@ -1700,7 +1700,7 @@ mod _os {
}
#[pyfunction]
pub fn ftruncate(fd: i32, length: i64, vm: &VirtualMachine) -> PyResult<()> {
pub fn ftruncate(fd: i32, length: Offset, vm: &VirtualMachine) -> PyResult<()> {
Fd(fd).ftruncate(length).map_err(|e| e.into_pyexception(vm))
}