aboutsummaryrefslogtreecommitdiff
path: root/src/syscall/mksyscall.pl
diff options
context:
space:
mode:
Diffstat (limited to 'src/syscall/mksyscall.pl')
-rwxr-xr-xsrc/syscall/mksyscall.pl4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/syscall/mksyscall.pl b/src/syscall/mksyscall.pl
index 667ca54c02..75345df159 100755
--- a/src/syscall/mksyscall.pl
+++ b/src/syscall/mksyscall.pl
@@ -350,6 +350,10 @@ while(<>) {
$text .= "//go:linkname $funcname $funcname\n";
# Tell the linker that funcname can be found in libSystem using varname without the libc_ prefix.
my $basename = substr $funcname, 5;
+ if($basename eq "readdir_r" && ($ENV{'GOARCH'} eq "386" || $ENV{'GOARCH'} eq "amd64")) {
+ # Hack to make sure we get the 64-bit inode version on darwin/macOS.
+ $basename .= "\$INODE64"
+ }
$text .= "//go:cgo_import_dynamic $funcname $basename \"/usr/lib/libSystem.B.dylib\"\n\n";
}
}