Use the MAX_ERRNO constant.
If you're going to hardcode a constant, you could at least try to
get the constant right...
Change-Id: I886a2593357d1c4dfd6c42649c63e8a35c15a441
diff --git a/libc/arch-x86/bionic/syscall.S b/libc/arch-x86/bionic/syscall.S
index 4452da4..0178f41 100644
--- a/libc/arch-x86/bionic/syscall.S
+++ b/libc/arch-x86/bionic/syscall.S
@@ -10,8 +10,7 @@
* %ebp: arg5 - callee save
*/
-#include <asm/unistd.h>
-#include <machine/asm.h>
+#include <private/bionic_asm.h>
ENTRY(syscall)
# Push the callee save registers.
@@ -34,7 +33,7 @@
int $0x80
# Error?
- cmpl $-4095, %eax
+ cmpl $-MAX_ERRNO, %eax
jb 1f
# Yes, so set errno.
negl %eax