summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2004-02-18 16:51:22 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2004-02-18 16:51:22 +0000
commit202192e36d491839f0546e5f85aa4b0e8da0423b (patch)
tree6dbcd258d09d0f8bb9c0c541b7efe3971cb429b8
parentf77c869a99b68560c0dd2e7250eab84870cf0ef8 (diff)
errno is int, not long; tracked down by otto@
ok deraadt@
-rw-r--r--lib/libc/arch/amd64/sys/cerror.S8
-rw-r--r--lib/libc/arch/x86_64/sys/cerror.S8
2 files changed, 8 insertions, 8 deletions
diff --git a/lib/libc/arch/amd64/sys/cerror.S b/lib/libc/arch/amd64/sys/cerror.S
index f45b3b09cf2..2bd7fb1484f 100644
--- a/lib/libc/arch/amd64/sys/cerror.S
+++ b/lib/libc/arch/amd64/sys/cerror.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: cerror.S,v 1.2 2004/02/10 16:46:30 drahn Exp $ */
+/* $OpenBSD: cerror.S,v 1.3 2004/02/18 16:51:21 miod Exp $ */
/* $NetBSD: cerror.S,v 1.2 2002/06/03 18:30:33 fvdl Exp $ */
/*-
@@ -47,10 +47,10 @@
_ENTRY(CERROR)
#ifdef PIC
- movq PIC_GOT(_C_LABEL(errno)), %rcx
- movq %rax, (%rcx)
+ movq PIC_GOT(_C_LABEL(errno)), %rcx
+ movl %eax, (%rcx)
#else
- movq %rax, _C_LABEL(errno)(%rip)
+ movl %eax, _C_LABEL(errno)(%rip)
#endif /* PIC */
movq $-1,%rax
ret
diff --git a/lib/libc/arch/x86_64/sys/cerror.S b/lib/libc/arch/x86_64/sys/cerror.S
index f45b3b09cf2..2bd7fb1484f 100644
--- a/lib/libc/arch/x86_64/sys/cerror.S
+++ b/lib/libc/arch/x86_64/sys/cerror.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: cerror.S,v 1.2 2004/02/10 16:46:30 drahn Exp $ */
+/* $OpenBSD: cerror.S,v 1.3 2004/02/18 16:51:21 miod Exp $ */
/* $NetBSD: cerror.S,v 1.2 2002/06/03 18:30:33 fvdl Exp $ */
/*-
@@ -47,10 +47,10 @@
_ENTRY(CERROR)
#ifdef PIC
- movq PIC_GOT(_C_LABEL(errno)), %rcx
- movq %rax, (%rcx)
+ movq PIC_GOT(_C_LABEL(errno)), %rcx
+ movl %eax, (%rcx)
#else
- movq %rax, _C_LABEL(errno)(%rip)
+ movl %eax, _C_LABEL(errno)(%rip)
#endif /* PIC */
movq $-1,%rax
ret