diff --git a/unix/mksyscall_solaris.pl b/unix/mksyscall_solaris.pl
index e81edb9..9ec19e0 100755
--- a/unix/mksyscall_solaris.pl
+++ b/unix/mksyscall_solaris.pl
@@ -269,7 +269,10 @@ print <<EOF;
 
 package $package
 
-import "unsafe"
+import (
+	"syscall"
+	"unsafe"
+)
 EOF
 
 print "import \"golang.org/x/sys/unix\"\n" if $package ne "unix";
diff --git a/unix/syscall_solaris.go b/unix/syscall_solaris.go
index ea5ac78..a35874b 100644
--- a/unix/syscall_solaris.go
+++ b/unix/syscall_solaris.go
@@ -463,6 +463,7 @@ func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error)
 //sys	Link(path string, link string) (err error)
 //sys	Listen(s int, backlog int) (err error) = libsocket.listen
 //sys	Lstat(path string, stat *Stat_t) (err error)
+//sys	Madvise(b []byte, advice int) (err error)
 //sys	Mkdir(path string, mode uint32) (err error)
 //sys	Mknod(path string, mode uint32, dev int) (err error)
 //sys	Nanosleep(time *Timespec, leftover *Timespec) (err error)
@@ -527,3 +528,17 @@ func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
 	}
 	return
 }
+
+var mapper = &mmapper{
+	active: make(map[*byte][]byte),
+	mmap:   mmap,
+	munmap: munmap,
+}
+
+func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {
+	return mapper.Mmap(fd, offset, length, prot, flags)
+}
+
+func Munmap(b []byte) (err error) {
+	return mapper.Munmap(b)
+}
diff --git a/unix/zsyscall_solaris_amd64.go b/unix/zsyscall_solaris_amd64.go
index 4c2f8bf..75d8cc5 100644
--- a/unix/zsyscall_solaris_amd64.go
+++ b/unix/zsyscall_solaris_amd64.go
@@ -5,92 +5,97 @@
 
 package unix
 
-import "unsafe"
+import (
+	"syscall"
+	"unsafe"
+)
 
 var (
-	modlibc      = syscall.newLazySO("libc.so")
-	modlibsocket = syscall.newLazySO("libsocket.so")
-
-	procgetgroups    = modlibc.NewProc("getgroups")
-	procsetgroups    = modlibc.NewProc("setgroups")
-	procfcntl        = modlibc.NewProc("fcntl")
-	procaccept       = modlibsocket.NewProc("accept")
-	procsendmsg      = modlibsocket.NewProc("sendmsg")
-	procAccess       = modlibc.NewProc("access")
-	procAdjtime      = modlibc.NewProc("adjtime")
-	procChdir        = modlibc.NewProc("chdir")
-	procChmod        = modlibc.NewProc("chmod")
-	procChown        = modlibc.NewProc("chown")
-	procChroot       = modlibc.NewProc("chroot")
-	procClose        = modlibc.NewProc("close")
-	procDup          = modlibc.NewProc("dup")
-	procExit         = modlibc.NewProc("exit")
-	procFchdir       = modlibc.NewProc("fchdir")
-	procFchmod       = modlibc.NewProc("fchmod")
-	procFchown       = modlibc.NewProc("fchown")
-	procFpathconf    = modlibc.NewProc("fpathconf")
-	procFstat        = modlibc.NewProc("fstat")
-	procGetdents     = modlibc.NewProc("getdents")
-	procGetgid       = modlibc.NewProc("getgid")
-	procGetpid       = modlibc.NewProc("getpid")
-	procGeteuid      = modlibc.NewProc("geteuid")
-	procGetegid      = modlibc.NewProc("getegid")
-	procGetppid      = modlibc.NewProc("getppid")
-	procGetpriority  = modlibc.NewProc("getpriority")
-	procGetrlimit    = modlibc.NewProc("getrlimit")
+	modlibc = newLazySO("libc.so")
+	modlibsocket = newLazySO("libsocket.so")
+
+	procgetgroups = modlibc.NewProc("getgroups")
+	procsetgroups = modlibc.NewProc("setgroups")
+	procfcntl = modlibc.NewProc("fcntl")
+	procaccept = modlibsocket.NewProc("accept")
+	procsendmsg = modlibsocket.NewProc("sendmsg")
+	procAccess = modlibc.NewProc("access")
+	procAdjtime = modlibc.NewProc("adjtime")
+	procChdir = modlibc.NewProc("chdir")
+	procChmod = modlibc.NewProc("chmod")
+	procChown = modlibc.NewProc("chown")
+	procChroot = modlibc.NewProc("chroot")
+	procClose = modlibc.NewProc("close")
+	procDup = modlibc.NewProc("dup")
+	procExit = modlibc.NewProc("exit")
+	procFchdir = modlibc.NewProc("fchdir")
+	procFchmod = modlibc.NewProc("fchmod")
+	procFchown = modlibc.NewProc("fchown")
+	procFpathconf = modlibc.NewProc("fpathconf")
+	procFstat = modlibc.NewProc("fstat")
+	procGetdents = modlibc.NewProc("getdents")
+	procGetgid = modlibc.NewProc("getgid")
+	procGetpid = modlibc.NewProc("getpid")
+	procGeteuid = modlibc.NewProc("geteuid")
+	procGetegid = modlibc.NewProc("getegid")
+	procGetppid = modlibc.NewProc("getppid")
+	procGetpriority = modlibc.NewProc("getpriority")
+	procGetrlimit = modlibc.NewProc("getrlimit")
 	procGettimeofday = modlibc.NewProc("gettimeofday")
-	procGetuid       = modlibc.NewProc("getuid")
-	procKill         = modlibc.NewProc("kill")
-	procLchown       = modlibc.NewProc("lchown")
-	procLink         = modlibc.NewProc("link")
-	proclisten       = modlibsocket.NewProc("listen")
-	procLstat        = modlibc.NewProc("lstat")
-	procMkdir        = modlibc.NewProc("mkdir")
-	procMknod        = modlibc.NewProc("mknod")
-	procNanosleep    = modlibc.NewProc("nanosleep")
-	procOpen         = modlibc.NewProc("open")
-	procPathconf     = modlibc.NewProc("pathconf")
-	procPread        = modlibc.NewProc("pread")
-	procPwrite       = modlibc.NewProc("pwrite")
-	procread         = modlibc.NewProc("read")
-	procReadlink     = modlibc.NewProc("readlink")
-	procRename       = modlibc.NewProc("rename")
-	procRmdir        = modlibc.NewProc("rmdir")
-	proclseek        = modlibc.NewProc("lseek")
-	procSetegid      = modlibc.NewProc("setegid")
-	procSeteuid      = modlibc.NewProc("seteuid")
-	procSetgid       = modlibc.NewProc("setgid")
-	procSetpgid      = modlibc.NewProc("setpgid")
-	procSetpriority  = modlibc.NewProc("setpriority")
-	procSetregid     = modlibc.NewProc("setregid")
-	procSetreuid     = modlibc.NewProc("setreuid")
-	procSetrlimit    = modlibc.NewProc("setrlimit")
-	procSetsid       = modlibc.NewProc("setsid")
-	procSetuid       = modlibc.NewProc("setuid")
-	procshutdown     = modlibsocket.NewProc("shutdown")
-	procStat         = modlibc.NewProc("stat")
-	procSymlink      = modlibc.NewProc("symlink")
-	procSync         = modlibc.NewProc("sync")
-	procTruncate     = modlibc.NewProc("truncate")
-	procFsync        = modlibc.NewProc("fsync")
-	procFtruncate    = modlibc.NewProc("ftruncate")
-	procUmask        = modlibc.NewProc("umask")
-	procUnlink       = modlibc.NewProc("unlink")
-	procUtimes       = modlibc.NewProc("utimes")
-	procbind         = modlibsocket.NewProc("bind")
-	procconnect      = modlibsocket.NewProc("connect")
-	procmmap         = modlibc.NewProc("mmap")
-	procmunmap       = modlibc.NewProc("munmap")
-	procsendto       = modlibsocket.NewProc("sendto")
-	procsocket       = modlibsocket.NewProc("socket")
-	procsocketpair   = modlibsocket.NewProc("socketpair")
-	procwrite        = modlibc.NewProc("write")
-	procgetsockopt   = modlibsocket.NewProc("getsockopt")
-	procgetpeername  = modlibsocket.NewProc("getpeername")
-	procgetsockname  = modlibsocket.NewProc("getsockname")
-	procsetsockopt   = modlibsocket.NewProc("setsockopt")
-	procrecvfrom     = modlibsocket.NewProc("recvfrom")
-	procrecvmsg      = modlibsocket.NewProc("recvmsg")
+	procGetuid = modlibc.NewProc("getuid")
+	procKill = modlibc.NewProc("kill")
+	procLchown = modlibc.NewProc("lchown")
+	procLink = modlibc.NewProc("link")
+	proclisten = modlibsocket.NewProc("listen")
+	procLstat = modlibc.NewProc("lstat")
+	procMadvise = modlibc.NewProc("madvise")
+	procMkdir = modlibc.NewProc("mkdir")
+	procMknod = modlibc.NewProc("mknod")
+	procNanosleep = modlibc.NewProc("nanosleep")
+	procOpen = modlibc.NewProc("open")
+	procPathconf = modlibc.NewProc("pathconf")
+	procPread = modlibc.NewProc("pread")
+	procPwrite = modlibc.NewProc("pwrite")
+	procread = modlibc.NewProc("read")
+	procReadlink = modlibc.NewProc("readlink")
+	procRename = modlibc.NewProc("rename")
+	procRmdir = modlibc.NewProc("rmdir")
+	proclseek = modlibc.NewProc("lseek")
+	procSetegid = modlibc.NewProc("setegid")
+	procSeteuid = modlibc.NewProc("seteuid")
+	procSetgid = modlibc.NewProc("setgid")
+	procSetpgid = modlibc.NewProc("setpgid")
+	procSetpriority = modlibc.NewProc("setpriority")
+	procSetregid = modlibc.NewProc("setregid")
+	procSetreuid = modlibc.NewProc("setreuid")
+	procSetrlimit = modlibc.NewProc("setrlimit")
+	procSetsid = modlibc.NewProc("setsid")
+	procSetuid = modlibc.NewProc("setuid")
+	procshutdown = modlibsocket.NewProc("shutdown")
+	procStat = modlibc.NewProc("stat")
+	procSymlink = modlibc.NewProc("symlink")
+	procSync = modlibc.NewProc("sync")
+	procTruncate = modlibc.NewProc("truncate")
+	procFsync = modlibc.NewProc("fsync")
+	procFtruncate = modlibc.NewProc("ftruncate")
+	procUmask = modlibc.NewProc("umask")
+	procUnlink = modlibc.NewProc("unlink")
+	procUtimes = modlibc.NewProc("utimes")
+	procbind = modlibsocket.NewProc("bind")
+	procconnect = modlibsocket.NewProc("connect")
+	procmmap = modlibc.NewProc("mmap")
+	procmunmap = modlibc.NewProc("munmap")
+	procsendto = modlibsocket.NewProc("sendto")
+	procsocket = modlibsocket.NewProc("socket")
+	procsocketpair = modlibsocket.NewProc("socketpair")
+	procwrite = modlibc.NewProc("write")
+	procgetsockopt = modlibsocket.NewProc("getsockopt")
+	procgetpeername = modlibsocket.NewProc("getpeername")
+	procgetsockname = modlibsocket.NewProc("getsockname")
+	procsetsockopt = modlibsocket.NewProc("setsockopt")
+	procrecvfrom = modlibsocket.NewProc("recvfrom")
+	procrecvmsg = modlibsocket.NewProc("recvmsg")
+
 )
 
 func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
@@ -416,6 +421,18 @@ func Lstat(path string, stat *Stat_t) (err error) {
 	return
 }
 
+func Madvise(b []byte, advice int) (err error) {
+	var _p0 *byte
+	if len(b) > 0 {
+		_p0 = &b[0]
+	}
+	_, _, e1 := sysvicall6(procMadvise.Addr(), 3, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), uintptr(advice), 0, 0, 0)
+	if e1 != 0 {
+		err = e1
+	}
+	return
+}
+
 func Mkdir(path string, mode uint32) (err error) {
 	var _p0 *byte
 	_p0, err = BytePtrFromString(path)
@@ -906,3 +923,5 @@ func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
 	}
 	return
 }
+
+
diff --git a/unix/zsysnum_solaris_amd64.go b/unix/zsysnum_solaris_amd64.go
index c708659..7026b67 100644
--- a/unix/zsysnum_solaris_amd64.go
+++ b/unix/zsysnum_solaris_amd64.go
@@ -8,6 +8,7 @@ package unix
 
 // TODO(aram): remove these before Go 1.3.
 const (
+	SYS_IOCTL  = 54
 	SYS_EXECVE = 59
 	SYS_FCNTL  = 62
 )
