aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/sys_darwin_arm.s
diff options
context:
space:
mode:
authorKeith Randall <keithr@alum.mit.edu>2019-03-20 10:47:17 -0700
committerKeith Randall <khr@golang.org>2019-04-03 21:27:05 +0000
commit9da6530faab0a58c4c4e02b2f3f4a5c754dcbd4e (patch)
treea49cee6c873b4854bb64ae252f11dc6051869647 /src/runtime/sys_darwin_arm.s
parent48ef01051ae58265088ee87f3a408224d2cfaec3 (diff)
downloadgo-9da6530faab0a58c4c4e02b2f3f4a5c754dcbd4e.tar.xz
syscall: avoid _getdirentries64 on darwin
Getdirentries is implemented with the __getdirentries64 function in libSystem.dylib. That function works, but it's on Apple's can't-be-used-in-an-app-store-application list. Implement Getdirentries using the underlying fdopendir/readdir_r/closedir. The simulation isn't faithful, and could be slow, but it should handle common cases. Don't use Getdirentries in the stdlib, use fdopendir/readdir_r/closedir instead (via (*os.File).readdirnames). Fixes #30933 Update #28984 RELNOTE=yes Change-Id: Ia6b5d003e5bfe43ba54b1e1d9cfa792cc6511717 Reviewed-on: https://go-review.googlesource.com/c/go/+/168479 Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/runtime/sys_darwin_arm.s')
-rw-r--r--src/runtime/sys_darwin_arm.s2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/sys_darwin_arm.s b/src/runtime/sys_darwin_arm.s
index 54c7afbf34..6c3fa0739d 100644
--- a/src/runtime/sys_darwin_arm.s
+++ b/src/runtime/sys_darwin_arm.s
@@ -418,7 +418,7 @@ ok:
RET
// syscallPtr is like syscall except the libc function reports an
-// error by returning NULL.
+// error by returning NULL and setting errno.
TEXT runtime·syscallPtr(SB),NOSPLIT,$0
MOVW.W R0, -4(R13) // push structure pointer
MOVW 0(R0), R12 // fn