Skip to contentSkip to conversation

fix for ia32 lseek()

PATCH New David Mosberger 1 participant 1 message Jun 2, 2001

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix for ia32 lseek()

The attached patch fixes the IA-32 version of lseek() so it works for negative values of "offset". Without this fix, profile-based feedback doesn't work in the Intel compiler.

	--david
ia64/ia32/ia32_entry.S renamed from lia64/arch/ia64/ia32/ia32_entry.S +1 -1
diff -urN ../lia64/arch/ia64/ia32/ia32_entry.S arch/ia64/ia32/ia32_entry.S
@@ -140,7 +140,7 @@
 	data8 sys_lchown
 	data8 sys32_ni_syscall	  /* old break syscall holder */
 	data8 sys32_ni_syscall
-	data8 sys_lseek
+	data8 sys32_lseek
 	data8 sys_getpid	  /* 20 */
 	data8 sys_mount
 	data8 sys_oldumount
ia64/ia32/sys_ia32.c renamed from lia64/arch/ia64/ia32/sys_ia32.c +7 -0
diff -urN ../lia64/arch/ia64/ia32/sys_ia32.c arch/ia64/ia32/sys_ia32.c
@@ -2784,6 +2784,13 @@
 	return ret;
 }
 
+int
+sys32_lseek (int fd, int offset, int whence)
+{
+	/* Sign-extension of "offset" is important here... */
+	return sys_lseek(fd, offset, whence);
+}
+
 #ifdef	NOTYET  /* UNTESTED FOR IA64 FROM HERE DOWN */
 
 /* In order to reduce some races, while at the same time doing additional