shithub: mc

Download patch

ref: 7cb2053ab0228919b08a6c3674de5f474b431cc2
parent: 2d65d0a17fc82b22730254ad1fa05c1913452c9e
author: Ori Bernstein <[email protected]>
date: Wed Aug 14 17:25:55 EDT 2013

Return -ERRNO on error returns from syscalls.

    Should probably revisit error handling later, but this is
    a workable bandaid for now.

--- a/libstd/syscall-osx.s
+++ b/libstd/syscall-osx.s
@@ -17,6 +17,9 @@
 	movq 64(%rsp),%r9
 
 	syscall
+	jae success
+	negq %rax
 
+success:
 	popq %rbp
 	ret