aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2004-06-08 06:53:14 +0000
committerH. Peter Anvin <hpa@zytor.com>2004-06-08 06:53:14 +0000
commit63d5b2d1f4818cb941318eccbe89b11263c689a3 (patch)
treea0e9a45d8db8cf2ff8126a20ef661f71a1d79376
parentb3bcff3c8122b553bdc5782f3661668be364c134 (diff)
downloadklibc-63d5b2d1f4818cb941318eccbe89b11263c689a3.tar.gz
Fix O_LARGEFILE handling for i386 openklibc-0.128
-rw-r--r--klibc/arch/i386/open.S6
1 files changed, 6 insertions, 0 deletions
diff --git a/klibc/arch/i386/open.S b/klibc/arch/i386/open.S
index 8dfc5af886820..adc7f1ddad32d 100644
--- a/klibc/arch/i386/open.S
+++ b/klibc/arch/i386/open.S
@@ -7,6 +7,9 @@
#include <asm/unistd.h>
+/* <asm/fcntl.h>, despite the name, isn't assembly-safe */
+#define O_LARGEFILE 0100000
+
.globl open
.type open,@function
@@ -15,6 +18,9 @@ open:
movl 4(%esp),%eax
movl 8(%esp),%edx
movl 12(%esp),%ecx
+ orl $O_LARGEFILE,%edx
+#else
+ orl $O_LARGEFILE,8(%esp)
#endif
pushl $__NR_open
jmp __syscall_common