From: Benoit Sigoure Date: Mon, 29 Feb 2016 05:30:32 +0000 (-0800) Subject: syscall: Fix generator for Linux syscalls. X-Git-Tag: go1.7beta1~1643 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=21f2cb60eaf6636f66062585cce575af3e11edb5;p=gostls13.git syscall: Fix generator for Linux syscalls. In golang.org/cl/14449 the `getdents' system call got changed to use _SYS_getdents as a layer of indirection instead of SYS_GETDENTS64 for compatibility with mips64, but this broke mksyscall.pl, which then died with with: syscall_linux.go:840: malformed //sys declaration Change-Id: Icb61965d8730f6e81f9fb0fa28c7bab635470f09 Reviewed-on: https://go-review.googlesource.com/20051 Reviewed-by: Brad Fitzpatrick --- diff --git a/src/syscall/mksyscall.pl b/src/syscall/mksyscall.pl index 96437fe69c..6ee7c3c3e7 100755 --- a/src/syscall/mksyscall.pl +++ b/src/syscall/mksyscall.pl @@ -100,7 +100,7 @@ while(<>) { # Line must be of the form # func Open(path string, mode int, perm int) (fd int, errno error) # Split into name, in params, out params. - if(!/^\/\/sys(nb)? (\w+)\(([^()]*)\)\s*(?:\(([^()]+)\))?\s*(?:=\s*((?i)SYS_[A-Z0-9_]+))?$/) { + if(!/^\/\/sys(nb)? (\w+)\(([^()]*)\)\s*(?:\(([^()]+)\))?\s*(?:=\s*((?i)_?SYS_[A-Z0-9_]+))?$/) { print STDERR "$ARGV:$.: malformed //sys declaration\n"; $errors = 1; next;