Home | History | Annotate | Download | only in syscall
      1 // mksyscall_solaris.pl syscall_solaris.go syscall_solaris_amd64.go
      2 // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
      3 
      4 // +build amd64,solaris
      5 
      6 package syscall
      7 
      8 import "unsafe"
      9 
     10 //go:cgo_import_dynamic libc_getgroups getgroups "libc.so"
     11 //go:cgo_import_dynamic libc_setgroups setgroups "libc.so"
     12 //go:cgo_import_dynamic libc_fcntl fcntl "libc.so"
     13 //go:cgo_import_dynamic libc_accept accept "libsocket.so"
     14 //go:cgo_import_dynamic libc_sendmsg sendmsg "libsocket.so"
     15 //go:cgo_import_dynamic libc_Access access "libc.so"
     16 //go:cgo_import_dynamic libc_Adjtime adjtime "libc.so"
     17 //go:cgo_import_dynamic libc_Chdir chdir "libc.so"
     18 //go:cgo_import_dynamic libc_Chmod chmod "libc.so"
     19 //go:cgo_import_dynamic libc_Chown chown "libc.so"
     20 //go:cgo_import_dynamic libc_Chroot chroot "libc.so"
     21 //go:cgo_import_dynamic libc_Close close "libc.so"
     22 //go:cgo_import_dynamic libc_Dup dup "libc.so"
     23 //go:cgo_import_dynamic libc_Exit exit "libc.so"
     24 //go:cgo_import_dynamic libc_Fchdir fchdir "libc.so"
     25 //go:cgo_import_dynamic libc_Fchmod fchmod "libc.so"
     26 //go:cgo_import_dynamic libc_Fchown fchown "libc.so"
     27 //go:cgo_import_dynamic libc_Fpathconf fpathconf "libc.so"
     28 //go:cgo_import_dynamic libc_Fstat fstat "libc.so"
     29 //go:cgo_import_dynamic libc_Getdents getdents "libc.so"
     30 //go:cgo_import_dynamic libc_Getgid getgid "libc.so"
     31 //go:cgo_import_dynamic libc_Getpid getpid "libc.so"
     32 //go:cgo_import_dynamic libc_Geteuid geteuid "libc.so"
     33 //go:cgo_import_dynamic libc_Getegid getegid "libc.so"
     34 //go:cgo_import_dynamic libc_Getppid getppid "libc.so"
     35 //go:cgo_import_dynamic libc_Getpriority getpriority "libc.so"
     36 //go:cgo_import_dynamic libc_Getrlimit getrlimit "libc.so"
     37 //go:cgo_import_dynamic libc_Gettimeofday gettimeofday "libc.so"
     38 //go:cgo_import_dynamic libc_Getuid getuid "libc.so"
     39 //go:cgo_import_dynamic libc_Kill kill "libc.so"
     40 //go:cgo_import_dynamic libc_Lchown lchown "libc.so"
     41 //go:cgo_import_dynamic libc_Link link "libc.so"
     42 //go:cgo_import_dynamic libc_listen listen "libsocket.so"
     43 //go:cgo_import_dynamic libc_Lstat lstat "libc.so"
     44 //go:cgo_import_dynamic libc_Mkdir mkdir "libc.so"
     45 //go:cgo_import_dynamic libc_Mknod mknod "libc.so"
     46 //go:cgo_import_dynamic libc_Nanosleep nanosleep "libc.so"
     47 //go:cgo_import_dynamic libc_Open open "libc.so"
     48 //go:cgo_import_dynamic libc_Pathconf pathconf "libc.so"
     49 //go:cgo_import_dynamic libc_Pread pread "libc.so"
     50 //go:cgo_import_dynamic libc_Pwrite pwrite "libc.so"
     51 //go:cgo_import_dynamic libc_read read "libc.so"
     52 //go:cgo_import_dynamic libc_Readlink readlink "libc.so"
     53 //go:cgo_import_dynamic libc_Rename rename "libc.so"
     54 //go:cgo_import_dynamic libc_Rmdir rmdir "libc.so"
     55 //go:cgo_import_dynamic libc_lseek lseek "libc.so"
     56 //go:cgo_import_dynamic libc_sendfile sendfile "libsendfile.so"
     57 //go:cgo_import_dynamic libc_Setegid setegid "libc.so"
     58 //go:cgo_import_dynamic libc_Seteuid seteuid "libc.so"
     59 //go:cgo_import_dynamic libc_Setgid setgid "libc.so"
     60 //go:cgo_import_dynamic libc_Setpgid setpgid "libc.so"
     61 //go:cgo_import_dynamic libc_Setpriority setpriority "libc.so"
     62 //go:cgo_import_dynamic libc_Setregid setregid "libc.so"
     63 //go:cgo_import_dynamic libc_Setreuid setreuid "libc.so"
     64 //go:cgo_import_dynamic libc_Setrlimit setrlimit "libc.so"
     65 //go:cgo_import_dynamic libc_Setsid setsid "libc.so"
     66 //go:cgo_import_dynamic libc_Setuid setuid "libc.so"
     67 //go:cgo_import_dynamic libc_shutdown shutdown "libsocket.so"
     68 //go:cgo_import_dynamic libc_Stat stat "libc.so"
     69 //go:cgo_import_dynamic libc_Symlink symlink "libc.so"
     70 //go:cgo_import_dynamic libc_Sync sync "libc.so"
     71 //go:cgo_import_dynamic libc_Truncate truncate "libc.so"
     72 //go:cgo_import_dynamic libc_Fsync fsync "libc.so"
     73 //go:cgo_import_dynamic libc_Ftruncate ftruncate "libc.so"
     74 //go:cgo_import_dynamic libc_Umask umask "libc.so"
     75 //go:cgo_import_dynamic libc_Unlink unlink "libc.so"
     76 //go:cgo_import_dynamic libc_Utimes utimes "libc.so"
     77 //go:cgo_import_dynamic libc_bind bind "libsocket.so"
     78 //go:cgo_import_dynamic libc_connect connect "libsocket.so"
     79 //go:cgo_import_dynamic libc_mmap mmap "libc.so"
     80 //go:cgo_import_dynamic libc_munmap munmap "libc.so"
     81 //go:cgo_import_dynamic libc_sendto sendto "libsocket.so"
     82 //go:cgo_import_dynamic libc_socket socket "libsocket.so"
     83 //go:cgo_import_dynamic libc_socketpair socketpair "libsocket.so"
     84 //go:cgo_import_dynamic libc_write write "libc.so"
     85 //go:cgo_import_dynamic libc_getsockopt getsockopt "libsocket.so"
     86 //go:cgo_import_dynamic libc_getpeername getpeername "libsocket.so"
     87 //go:cgo_import_dynamic libc_getsockname getsockname "libsocket.so"
     88 //go:cgo_import_dynamic libc_setsockopt setsockopt "libsocket.so"
     89 //go:cgo_import_dynamic libc_recvfrom recvfrom "libsocket.so"
     90 //go:cgo_import_dynamic libc_recvmsg recvmsg "libsocket.so"
     91 
     92 //go:linkname libc_getgroups libc_getgroups
     93 //go:linkname libc_setgroups libc_setgroups
     94 //go:linkname libc_fcntl libc_fcntl
     95 //go:linkname libc_accept libc_accept
     96 //go:linkname libc_sendmsg libc_sendmsg
     97 //go:linkname libc_Access libc_Access
     98 //go:linkname libc_Adjtime libc_Adjtime
     99 //go:linkname libc_Chdir libc_Chdir
    100 //go:linkname libc_Chmod libc_Chmod
    101 //go:linkname libc_Chown libc_Chown
    102 //go:linkname libc_Chroot libc_Chroot
    103 //go:linkname libc_Close libc_Close
    104 //go:linkname libc_Dup libc_Dup
    105 //go:linkname libc_Exit libc_Exit
    106 //go:linkname libc_Fchdir libc_Fchdir
    107 //go:linkname libc_Fchmod libc_Fchmod
    108 //go:linkname libc_Fchown libc_Fchown
    109 //go:linkname libc_Fpathconf libc_Fpathconf
    110 //go:linkname libc_Fstat libc_Fstat
    111 //go:linkname libc_Getdents libc_Getdents
    112 //go:linkname libc_Getgid libc_Getgid
    113 //go:linkname libc_Getpid libc_Getpid
    114 //go:linkname libc_Geteuid libc_Geteuid
    115 //go:linkname libc_Getegid libc_Getegid
    116 //go:linkname libc_Getppid libc_Getppid
    117 //go:linkname libc_Getpriority libc_Getpriority
    118 //go:linkname libc_Getrlimit libc_Getrlimit
    119 //go:linkname libc_Gettimeofday libc_Gettimeofday
    120 //go:linkname libc_Getuid libc_Getuid
    121 //go:linkname libc_Kill libc_Kill
    122 //go:linkname libc_Lchown libc_Lchown
    123 //go:linkname libc_Link libc_Link
    124 //go:linkname libc_listen libc_listen
    125 //go:linkname libc_Lstat libc_Lstat
    126 //go:linkname libc_Mkdir libc_Mkdir
    127 //go:linkname libc_Mknod libc_Mknod
    128 //go:linkname libc_Nanosleep libc_Nanosleep
    129 //go:linkname libc_Open libc_Open
    130 //go:linkname libc_Pathconf libc_Pathconf
    131 //go:linkname libc_Pread libc_Pread
    132 //go:linkname libc_Pwrite libc_Pwrite
    133 //go:linkname libc_read libc_read
    134 //go:linkname libc_Readlink libc_Readlink
    135 //go:linkname libc_Rename libc_Rename
    136 //go:linkname libc_Rmdir libc_Rmdir
    137 //go:linkname libc_lseek libc_lseek
    138 //go:linkname libc_sendfile libc_sendfile
    139 //go:linkname libc_Setegid libc_Setegid
    140 //go:linkname libc_Seteuid libc_Seteuid
    141 //go:linkname libc_Setgid libc_Setgid
    142 //go:linkname libc_Setpgid libc_Setpgid
    143 //go:linkname libc_Setpriority libc_Setpriority
    144 //go:linkname libc_Setregid libc_Setregid
    145 //go:linkname libc_Setreuid libc_Setreuid
    146 //go:linkname libc_Setrlimit libc_Setrlimit
    147 //go:linkname libc_Setsid libc_Setsid
    148 //go:linkname libc_Setuid libc_Setuid
    149 //go:linkname libc_shutdown libc_shutdown
    150 //go:linkname libc_Stat libc_Stat
    151 //go:linkname libc_Symlink libc_Symlink
    152 //go:linkname libc_Sync libc_Sync
    153 //go:linkname libc_Truncate libc_Truncate
    154 //go:linkname libc_Fsync libc_Fsync
    155 //go:linkname libc_Ftruncate libc_Ftruncate
    156 //go:linkname libc_Umask libc_Umask
    157 //go:linkname libc_Unlink libc_Unlink
    158 //go:linkname libc_Utimes libc_Utimes
    159 //go:linkname libc_bind libc_bind
    160 //go:linkname libc_connect libc_connect
    161 //go:linkname libc_mmap libc_mmap
    162 //go:linkname libc_munmap libc_munmap
    163 //go:linkname libc_sendto libc_sendto
    164 //go:linkname libc_socket libc_socket
    165 //go:linkname libc_socketpair libc_socketpair
    166 //go:linkname libc_write libc_write
    167 //go:linkname libc_getsockopt libc_getsockopt
    168 //go:linkname libc_getpeername libc_getpeername
    169 //go:linkname libc_getsockname libc_getsockname
    170 //go:linkname libc_setsockopt libc_setsockopt
    171 //go:linkname libc_recvfrom libc_recvfrom
    172 //go:linkname libc_recvmsg libc_recvmsg
    173 
    174 type libcFunc uintptr
    175 
    176 var (
    177 	libc_getgroups,
    178 	libc_setgroups,
    179 	libc_fcntl,
    180 	libc_accept,
    181 	libc_sendmsg,
    182 	libc_Access,
    183 	libc_Adjtime,
    184 	libc_Chdir,
    185 	libc_Chmod,
    186 	libc_Chown,
    187 	libc_Chroot,
    188 	libc_Close,
    189 	libc_Dup,
    190 	libc_Exit,
    191 	libc_Fchdir,
    192 	libc_Fchmod,
    193 	libc_Fchown,
    194 	libc_Fpathconf,
    195 	libc_Fstat,
    196 	libc_Getdents,
    197 	libc_Getgid,
    198 	libc_Getpid,
    199 	libc_Geteuid,
    200 	libc_Getegid,
    201 	libc_Getppid,
    202 	libc_Getpriority,
    203 	libc_Getrlimit,
    204 	libc_Gettimeofday,
    205 	libc_Getuid,
    206 	libc_Kill,
    207 	libc_Lchown,
    208 	libc_Link,
    209 	libc_listen,
    210 	libc_Lstat,
    211 	libc_Mkdir,
    212 	libc_Mknod,
    213 	libc_Nanosleep,
    214 	libc_Open,
    215 	libc_Pathconf,
    216 	libc_Pread,
    217 	libc_Pwrite,
    218 	libc_read,
    219 	libc_Readlink,
    220 	libc_Rename,
    221 	libc_Rmdir,
    222 	libc_lseek,
    223 	libc_sendfile,
    224 	libc_Setegid,
    225 	libc_Seteuid,
    226 	libc_Setgid,
    227 	libc_Setpgid,
    228 	libc_Setpriority,
    229 	libc_Setregid,
    230 	libc_Setreuid,
    231 	libc_Setrlimit,
    232 	libc_Setsid,
    233 	libc_Setuid,
    234 	libc_shutdown,
    235 	libc_Stat,
    236 	libc_Symlink,
    237 	libc_Sync,
    238 	libc_Truncate,
    239 	libc_Fsync,
    240 	libc_Ftruncate,
    241 	libc_Umask,
    242 	libc_Unlink,
    243 	libc_Utimes,
    244 	libc_bind,
    245 	libc_connect,
    246 	libc_mmap,
    247 	libc_munmap,
    248 	libc_sendto,
    249 	libc_socket,
    250 	libc_socketpair,
    251 	libc_write,
    252 	libc_getsockopt,
    253 	libc_getpeername,
    254 	libc_getsockname,
    255 	libc_setsockopt,
    256 	libc_recvfrom,
    257 	libc_recvmsg libcFunc
    258 )
    259 
    260 func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
    261 	r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc_getgroups)), 2, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0, 0, 0, 0)
    262 	n = int(r0)
    263 	if e1 != 0 {
    264 		err = errnoErr(e1)
    265 	}
    266 	return
    267 }
    268 
    269 func setgroups(ngid int, gid *_Gid_t) (err error) {
    270 	_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc_setgroups)), 2, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0, 0, 0, 0)
    271 	if e1 != 0 {
    272 		err = errnoErr(e1)
    273 	}
    274 	return
    275 }
    276 
    277 func fcntl(fd int, cmd int, arg int) (val int, err error) {
    278 	r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_fcntl)), 3, uintptr(fd), uintptr(cmd), uintptr(arg), 0, 0, 0)
    279 	val = int(r0)
    280 	if e1 != 0 {
    281 		err = errnoErr(e1)
    282 	}
    283 	return
    284 }
    285 
    286 func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
    287 	r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_accept)), 3, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
    288 	fd = int(r0)
    289 	if e1 != 0 {
    290 		err = errnoErr(e1)
    291 	}
    292 	return
    293 }
    294 
    295 func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
    296 	r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_sendmsg)), 3, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0)
    297 	n = int(r0)
    298 	if e1 != 0 {
    299 		err = errnoErr(e1)
    300 	}
    301 	return
    302 }
    303 
    304 func Access(path string, mode uint32) (err error) {
    305 	var _p0 *byte
    306 	_p0, err = BytePtrFromString(path)
    307 	if err != nil {
    308 		return
    309 	}
    310 	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Access)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)
    311 	use(unsafe.Pointer(_p0))
    312 	if e1 != 0 {
    313 		err = errnoErr(e1)
    314 	}
    315 	return
    316 }
    317 
    318 func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
    319 	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Adjtime)), 2, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0, 0, 0, 0)
    320 	if e1 != 0 {
    321 		err = errnoErr(e1)
    322 	}
    323 	return
    324 }
    325 
    326 func Chdir(path string) (err error) {
    327 	var _p0 *byte
    328 	_p0, err = BytePtrFromString(path)
    329 	if err != nil {
    330 		return
    331 	}
    332 	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Chdir)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)
    333 	use(unsafe.Pointer(_p0))
    334 	if e1 != 0 {
    335 		err = errnoErr(e1)
    336 	}
    337 	return
    338 }
    339 
    340 func Chmod(path string, mode uint32) (err error) {
    341 	var _p0 *byte
    342 	_p0, err = BytePtrFromString(path)
    343 	if err != nil {
    344 		return
    345 	}
    346 	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Chmod)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)
    347 	use(unsafe.Pointer(_p0))
    348 	if e1 != 0 {
    349 		err = errnoErr(e1)
    350 	}
    351 	return
    352 }
    353 
    354 func Chown(path string, uid int, gid int) (err error) {
    355 	var _p0 *byte
    356 	_p0, err = BytePtrFromString(path)
    357 	if err != nil {
    358 		return
    359 	}
    360 	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Chown)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), 0, 0, 0)
    361 	use(unsafe.Pointer(_p0))
    362 	if e1 != 0 {
    363 		err = errnoErr(e1)
    364 	}
    365 	return
    366 }
    367 
    368 func Chroot(path string) (err error) {
    369 	var _p0 *byte
    370 	_p0, err = BytePtrFromString(path)
    371 	if err != nil {
    372 		return
    373 	}
    374 	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Chroot)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)
    375 	use(unsafe.Pointer(_p0))
    376 	if e1 != 0 {
    377 		err = errnoErr(e1)
    378 	}
    379 	return
    380 }
    381 
    382 func Close(fd int) (err error) {
    383 	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Close)), 1, uintptr(fd), 0, 0, 0, 0, 0)
    384 	if e1 != 0 {
    385 		err = errnoErr(e1)
    386 	}
    387 	return
    388 }
    389 
    390 func Dup(fd int) (nfd int, err error) {
    391 	r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Dup)), 1, uintptr(fd), 0, 0, 0, 0, 0)
    392 	nfd = int(r0)
    393 	if e1 != 0 {
    394 		err = errnoErr(e1)
    395 	}
    396 	return
    397 }
    398 
    399 func Exit(code int) {
    400 	sysvicall6(uintptr(unsafe.Pointer(&libc_Exit)), 1, uintptr(code), 0, 0, 0, 0, 0)
    401 	return
    402 }
    403 
    404 func Fchdir(fd int) (err error) {
    405 	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Fchdir)), 1, uintptr(fd), 0, 0, 0, 0, 0)
    406 	if e1 != 0 {
    407 		err = errnoErr(e1)
    408 	}
    409 	return
    410 }
    411 
    412 func Fchmod(fd int, mode uint32) (err error) {
    413 	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Fchmod)), 2, uintptr(fd), uintptr(mode), 0, 0, 0, 0)
    414 	if e1 != 0 {
    415 		err = errnoErr(e1)
    416 	}
    417 	return
    418 }
    419 
    420 func Fchown(fd int, uid int, gid int) (err error) {
    421 	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Fchown)), 3, uintptr(fd), uintptr(uid), uintptr(gid), 0, 0, 0)
    422 	if e1 != 0 {
    423 		err = errnoErr(e1)
    424 	}
    425 	return
    426 }
    427 
    428 func Fpathconf(fd int, name int) (val int, err error) {
    429 	r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Fpathconf)), 2, uintptr(fd), uintptr(name), 0, 0, 0, 0)
    430 	val = int(r0)
    431 	if e1 != 0 {
    432 		err = errnoErr(e1)
    433 	}
    434 	return
    435 }
    436 
    437 func Fstat(fd int, stat *Stat_t) (err error) {
    438 	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Fstat)), 2, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0)
    439 	if e1 != 0 {
    440 		err = errnoErr(e1)
    441 	}
    442 	return
    443 }
    444 
    445 func Getdents(fd int, buf []byte, basep *uintptr) (n int, err error) {
    446 	var _p0 *byte
    447 	if len(buf) > 0 {
    448 		_p0 = &buf[0]
    449 	}
    450 	r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Getdents)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
    451 	n = int(r0)
    452 	if e1 != 0 {
    453 		err = errnoErr(e1)
    454 	}
    455 	return
    456 }
    457 
    458 func Getgid() (gid int) {
    459 	r0, _, _ := rawSysvicall6(uintptr(unsafe.Pointer(&libc_Getgid)), 0, 0, 0, 0, 0, 0, 0)
    460 	gid = int(r0)
    461 	return
    462 }
    463 
    464 func Getpid() (pid int) {
    465 	r0, _, _ := rawSysvicall6(uintptr(unsafe.Pointer(&libc_Getpid)), 0, 0, 0, 0, 0, 0, 0)
    466 	pid = int(r0)
    467 	return
    468 }
    469 
    470 func Geteuid() (euid int) {
    471 	r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&libc_Geteuid)), 0, 0, 0, 0, 0, 0, 0)
    472 	euid = int(r0)
    473 	return
    474 }
    475 
    476 func Getegid() (egid int) {
    477 	r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&libc_Getegid)), 0, 0, 0, 0, 0, 0, 0)
    478 	egid = int(r0)
    479 	return
    480 }
    481 
    482 func Getppid() (ppid int) {
    483 	r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&libc_Getppid)), 0, 0, 0, 0, 0, 0, 0)
    484 	ppid = int(r0)
    485 	return
    486 }
    487 
    488 func Getpriority(which int, who int) (n int, err error) {
    489 	r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Getpriority)), 2, uintptr(which), uintptr(who), 0, 0, 0, 0)
    490 	n = int(r0)
    491 	if e1 != 0 {
    492 		err = errnoErr(e1)
    493 	}
    494 	return
    495 }
    496 
    497 func Getrlimit(which int, lim *Rlimit) (err error) {
    498 	_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc_Getrlimit)), 2, uintptr(which), uintptr(unsafe.Pointer(lim)), 0, 0, 0, 0)
    499 	if e1 != 0 {
    500 		err = errnoErr(e1)
    501 	}
    502 	return
    503 }
    504 
    505 func Gettimeofday(tv *Timeval) (err error) {
    506 	_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc_Gettimeofday)), 1, uintptr(unsafe.Pointer(tv)), 0, 0, 0, 0, 0)
    507 	if e1 != 0 {
    508 		err = errnoErr(e1)
    509 	}
    510 	return
    511 }
    512 
    513 func Getuid() (uid int) {
    514 	r0, _, _ := rawSysvicall6(uintptr(unsafe.Pointer(&libc_Getuid)), 0, 0, 0, 0, 0, 0, 0)
    515 	uid = int(r0)
    516 	return
    517 }
    518 
    519 func Kill(pid int, signum Signal) (err error) {
    520 	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Kill)), 2, uintptr(pid), uintptr(signum), 0, 0, 0, 0)
    521 	if e1 != 0 {
    522 		err = errnoErr(e1)
    523 	}
    524 	return
    525 }
    526 
    527 func Lchown(path string, uid int, gid int) (err error) {
    528 	var _p0 *byte
    529 	_p0, err = BytePtrFromString(path)
    530 	if err != nil {
    531 		return
    532 	}
    533 	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Lchown)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), 0, 0, 0)
    534 	use(unsafe.Pointer(_p0))
    535 	if e1 != 0 {
    536 		err = errnoErr(e1)
    537 	}
    538 	return
    539 }
    540 
    541 func Link(path string, link string) (err error) {
    542 	var _p0 *byte
    543 	_p0, err = BytePtrFromString(path)
    544 	if err != nil {
    545 		return
    546 	}
    547 	var _p1 *byte
    548 	_p1, err = BytePtrFromString(link)
    549 	if err != nil {
    550 		return
    551 	}
    552 	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Link)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0)
    553 	use(unsafe.Pointer(_p0))
    554 	use(unsafe.Pointer(_p1))
    555 	if e1 != 0 {
    556 		err = errnoErr(e1)
    557 	}
    558 	return
    559 }
    560 
    561 func Listen(s int, backlog int) (err error) {
    562 	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_listen)), 2, uintptr(s), uintptr(backlog), 0, 0, 0, 0)
    563 	if e1 != 0 {
    564 		err = errnoErr(e1)
    565 	}
    566 	return
    567 }
    568 
    569 func Lstat(path string, stat *Stat_t) (err error) {
    570 	var _p0 *byte
    571 	_p0, err = BytePtrFromString(path)
    572 	if err != nil {
    573 		return
    574 	}
    575 	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Lstat)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0)
    576 	use(unsafe.Pointer(_p0))
    577 	if e1 != 0 {
    578 		err = errnoErr(e1)
    579 	}
    580 	return
    581 }
    582 
    583 func Mkdir(path string, mode uint32) (err error) {
    584 	var _p0 *byte
    585 	_p0, err = BytePtrFromString(path)
    586 	if err != nil {
    587 		return
    588 	}
    589 	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Mkdir)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)
    590 	use(unsafe.Pointer(_p0))
    591 	if e1 != 0 {
    592 		err = errnoErr(e1)
    593 	}
    594 	return
    595 }
    596 
    597 func Mknod(path string, mode uint32, dev int) (err error) {
    598 	var _p0 *byte
    599 	_p0, err = BytePtrFromString(path)
    600 	if err != nil {
    601 		return
    602 	}
    603 	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Mknod)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0, 0)
    604 	use(unsafe.Pointer(_p0))
    605 	if e1 != 0 {
    606 		err = errnoErr(e1)
    607 	}
    608 	return
    609 }
    610 
    611 func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
    612 	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Nanosleep)), 2, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0, 0, 0, 0)
    613 	if e1 != 0 {
    614 		err = errnoErr(e1)
    615 	}
    616 	return
    617 }
    618 
    619 func Open(path string, mode int, perm uint32) (fd int, err error) {
    620 	var _p0 *byte
    621 	_p0, err = BytePtrFromString(path)
    622 	if err != nil {
    623 		return
    624 	}
    625 	r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Open)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0, 0)
    626 	use(unsafe.Pointer(_p0))
    627 	fd = int(r0)
    628 	if e1 != 0 {
    629 		err = errnoErr(e1)
    630 	}
    631 	return
    632 }
    633 
    634 func Pathconf(path string, name int) (val int, err error) {
    635 	var _p0 *byte
    636 	_p0, err = BytePtrFromString(path)
    637 	if err != nil {
    638 		return
    639 	}
    640 	r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Pathconf)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0, 0, 0, 0)
    641 	use(unsafe.Pointer(_p0))
    642 	val = int(r0)
    643 	if e1 != 0 {
    644 		err = errnoErr(e1)
    645 	}
    646 	return
    647 }
    648 
    649 func Pread(fd int, p []byte, offset int64) (n int, err error) {
    650 	var _p0 *byte
    651 	if len(p) > 0 {
    652 		_p0 = &p[0]
    653 	}
    654 	r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Pread)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0)
    655 	n = int(r0)
    656 	if e1 != 0 {
    657 		err = errnoErr(e1)
    658 	}
    659 	return
    660 }
    661 
    662 func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
    663 	var _p0 *byte
    664 	if len(p) > 0 {
    665 		_p0 = &p[0]
    666 	}
    667 	r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Pwrite)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0)
    668 	n = int(r0)
    669 	if e1 != 0 {
    670 		err = errnoErr(e1)
    671 	}
    672 	return
    673 }
    674 
    675 func read(fd int, p []byte) (n int, err error) {
    676 	var _p0 *byte
    677 	if len(p) > 0 {
    678 		_p0 = &p[0]
    679 	}
    680 	r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_read)), 3, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0, 0, 0)
    681 	n = int(r0)
    682 	if e1 != 0 {
    683 		err = errnoErr(e1)
    684 	}
    685 	return
    686 }
    687 
    688 func Readlink(path string, buf []byte) (n int, err error) {
    689 	var _p0 *byte
    690 	_p0, err = BytePtrFromString(path)
    691 	if err != nil {
    692 		return
    693 	}
    694 	var _p1 *byte
    695 	if len(buf) > 0 {
    696 		_p1 = &buf[0]
    697 	}
    698 	r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Readlink)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(len(buf)), 0, 0, 0)
    699 	use(unsafe.Pointer(_p0))
    700 	n = int(r0)
    701 	if e1 != 0 {
    702 		err = errnoErr(e1)
    703 	}
    704 	return
    705 }
    706 
    707 func Rename(from string, to string) (err error) {
    708 	var _p0 *byte
    709 	_p0, err = BytePtrFromString(from)
    710 	if err != nil {
    711 		return
    712 	}
    713 	var _p1 *byte
    714 	_p1, err = BytePtrFromString(to)
    715 	if err != nil {
    716 		return
    717 	}
    718 	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Rename)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0)
    719 	use(unsafe.Pointer(_p0))
    720 	use(unsafe.Pointer(_p1))
    721 	if e1 != 0 {
    722 		err = errnoErr(e1)
    723 	}
    724 	return
    725 }
    726 
    727 func Rmdir(path string) (err error) {
    728 	var _p0 *byte
    729 	_p0, err = BytePtrFromString(path)
    730 	if err != nil {
    731 		return
    732 	}
    733 	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Rmdir)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)
    734 	use(unsafe.Pointer(_p0))
    735 	if e1 != 0 {
    736 		err = errnoErr(e1)
    737 	}
    738 	return
    739 }
    740 
    741 func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
    742 	r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_lseek)), 3, uintptr(fd), uintptr(offset), uintptr(whence), 0, 0, 0)
    743 	newoffset = int64(r0)
    744 	if e1 != 0 {
    745 		err = errnoErr(e1)
    746 	}
    747 	return
    748 }
    749 
    750 func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
    751 	r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_sendfile)), 4, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
    752 	written = int(r0)
    753 	if e1 != 0 {
    754 		err = errnoErr(e1)
    755 	}
    756 	return
    757 }
    758 
    759 func Setegid(egid int) (err error) {
    760 	_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc_Setegid)), 1, uintptr(egid), 0, 0, 0, 0, 0)
    761 	if e1 != 0 {
    762 		err = errnoErr(e1)
    763 	}
    764 	return
    765 }
    766 
    767 func Seteuid(euid int) (err error) {
    768 	_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc_Seteuid)), 1, uintptr(euid), 0, 0, 0, 0, 0)
    769 	if e1 != 0 {
    770 		err = errnoErr(e1)
    771 	}
    772 	return
    773 }
    774 
    775 func Setgid(gid int) (err error) {
    776 	_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc_Setgid)), 1, uintptr(gid), 0, 0, 0, 0, 0)
    777 	if e1 != 0 {
    778 		err = errnoErr(e1)
    779 	}
    780 	return
    781 }
    782 
    783 func Setpgid(pid int, pgid int) (err error) {
    784 	_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc_Setpgid)), 2, uintptr(pid), uintptr(pgid), 0, 0, 0, 0)
    785 	if e1 != 0 {
    786 		err = errnoErr(e1)
    787 	}
    788 	return
    789 }
    790 
    791 func Setpriority(which int, who int, prio int) (err error) {
    792 	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Setpriority)), 3, uintptr(which), uintptr(who), uintptr(prio), 0, 0, 0)
    793 	if e1 != 0 {
    794 		err = errnoErr(e1)
    795 	}
    796 	return
    797 }
    798 
    799 func Setregid(rgid int, egid int) (err error) {
    800 	_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc_Setregid)), 2, uintptr(rgid), uintptr(egid), 0, 0, 0, 0)
    801 	if e1 != 0 {
    802 		err = errnoErr(e1)
    803 	}
    804 	return
    805 }
    806 
    807 func Setreuid(ruid int, euid int) (err error) {
    808 	_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc_Setreuid)), 2, uintptr(ruid), uintptr(euid), 0, 0, 0, 0)
    809 	if e1 != 0 {
    810 		err = errnoErr(e1)
    811 	}
    812 	return
    813 }
    814 
    815 func Setrlimit(which int, lim *Rlimit) (err error) {
    816 	_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc_Setrlimit)), 2, uintptr(which), uintptr(unsafe.Pointer(lim)), 0, 0, 0, 0)
    817 	if e1 != 0 {
    818 		err = errnoErr(e1)
    819 	}
    820 	return
    821 }
    822 
    823 func Setsid() (pid int, err error) {
    824 	r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc_Setsid)), 0, 0, 0, 0, 0, 0, 0)
    825 	pid = int(r0)
    826 	if e1 != 0 {
    827 		err = errnoErr(e1)
    828 	}
    829 	return
    830 }
    831 
    832 func Setuid(uid int) (err error) {
    833 	_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc_Setuid)), 1, uintptr(uid), 0, 0, 0, 0, 0)
    834 	if e1 != 0 {
    835 		err = errnoErr(e1)
    836 	}
    837 	return
    838 }
    839 
    840 func Shutdown(s int, how int) (err error) {
    841 	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_shutdown)), 2, uintptr(s), uintptr(how), 0, 0, 0, 0)
    842 	if e1 != 0 {
    843 		err = errnoErr(e1)
    844 	}
    845 	return
    846 }
    847 
    848 func Stat(path string, stat *Stat_t) (err error) {
    849 	var _p0 *byte
    850 	_p0, err = BytePtrFromString(path)
    851 	if err != nil {
    852 		return
    853 	}
    854 	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Stat)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0)
    855 	use(unsafe.Pointer(_p0))
    856 	if e1 != 0 {
    857 		err = errnoErr(e1)
    858 	}
    859 	return
    860 }
    861 
    862 func Symlink(path string, link string) (err error) {
    863 	var _p0 *byte
    864 	_p0, err = BytePtrFromString(path)
    865 	if err != nil {
    866 		return
    867 	}
    868 	var _p1 *byte
    869 	_p1, err = BytePtrFromString(link)
    870 	if err != nil {
    871 		return
    872 	}
    873 	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Symlink)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0)
    874 	use(unsafe.Pointer(_p0))
    875 	use(unsafe.Pointer(_p1))
    876 	if e1 != 0 {
    877 		err = errnoErr(e1)
    878 	}
    879 	return
    880 }
    881 
    882 func Sync() (err error) {
    883 	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Sync)), 0, 0, 0, 0, 0, 0, 0)
    884 	if e1 != 0 {
    885 		err = errnoErr(e1)
    886 	}
    887 	return
    888 }
    889 
    890 func Truncate(path string, length int64) (err error) {
    891 	var _p0 *byte
    892 	_p0, err = BytePtrFromString(path)
    893 	if err != nil {
    894 		return
    895 	}
    896 	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Truncate)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0, 0, 0, 0)
    897 	use(unsafe.Pointer(_p0))
    898 	if e1 != 0 {
    899 		err = errnoErr(e1)
    900 	}
    901 	return
    902 }
    903 
    904 func Fsync(fd int) (err error) {
    905 	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Fsync)), 1, uintptr(fd), 0, 0, 0, 0, 0)
    906 	if e1 != 0 {
    907 		err = errnoErr(e1)
    908 	}
    909 	return
    910 }
    911 
    912 func Ftruncate(fd int, length int64) (err error) {
    913 	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Ftruncate)), 2, uintptr(fd), uintptr(length), 0, 0, 0, 0)
    914 	if e1 != 0 {
    915 		err = errnoErr(e1)
    916 	}
    917 	return
    918 }
    919 
    920 func Umask(newmask int) (oldmask int) {
    921 	r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&libc_Umask)), 1, uintptr(newmask), 0, 0, 0, 0, 0)
    922 	oldmask = int(r0)
    923 	return
    924 }
    925 
    926 func Unlink(path string) (err error) {
    927 	var _p0 *byte
    928 	_p0, err = BytePtrFromString(path)
    929 	if err != nil {
    930 		return
    931 	}
    932 	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Unlink)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)
    933 	use(unsafe.Pointer(_p0))
    934 	if e1 != 0 {
    935 		err = errnoErr(e1)
    936 	}
    937 	return
    938 }
    939 
    940 func Utimes(path string, times *[2]Timeval) (err error) {
    941 	var _p0 *byte
    942 	_p0, err = BytePtrFromString(path)
    943 	if err != nil {
    944 		return
    945 	}
    946 	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_Utimes)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0, 0, 0, 0)
    947 	use(unsafe.Pointer(_p0))
    948 	if e1 != 0 {
    949 		err = errnoErr(e1)
    950 	}
    951 	return
    952 }
    953 
    954 func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
    955 	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_bind)), 3, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0)
    956 	if e1 != 0 {
    957 		err = errnoErr(e1)
    958 	}
    959 	return
    960 }
    961 
    962 func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
    963 	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_connect)), 3, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0)
    964 	if e1 != 0 {
    965 		err = errnoErr(e1)
    966 	}
    967 	return
    968 }
    969 
    970 func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
    971 	r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_mmap)), 6, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
    972 	ret = uintptr(r0)
    973 	if e1 != 0 {
    974 		err = errnoErr(e1)
    975 	}
    976 	return
    977 }
    978 
    979 func munmap(addr uintptr, length uintptr) (err error) {
    980 	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_munmap)), 2, uintptr(addr), uintptr(length), 0, 0, 0, 0)
    981 	if e1 != 0 {
    982 		err = errnoErr(e1)
    983 	}
    984 	return
    985 }
    986 
    987 func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
    988 	var _p0 *byte
    989 	if len(buf) > 0 {
    990 		_p0 = &buf[0]
    991 	}
    992 	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_sendto)), 6, uintptr(s), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
    993 	if e1 != 0 {
    994 		err = errnoErr(e1)
    995 	}
    996 	return
    997 }
    998 
    999 func socket(domain int, typ int, proto int) (fd int, err error) {
   1000 	r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_socket)), 3, uintptr(domain), uintptr(typ), uintptr(proto), 0, 0, 0)
   1001 	fd = int(r0)
   1002 	if e1 != 0 {
   1003 		err = errnoErr(e1)
   1004 	}
   1005 	return
   1006 }
   1007 
   1008 func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
   1009 	_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc_socketpair)), 4, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
   1010 	if e1 != 0 {
   1011 		err = errnoErr(e1)
   1012 	}
   1013 	return
   1014 }
   1015 
   1016 func write(fd int, p []byte) (n int, err error) {
   1017 	var _p0 *byte
   1018 	if len(p) > 0 {
   1019 		_p0 = &p[0]
   1020 	}
   1021 	r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_write)), 3, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0, 0, 0)
   1022 	n = int(r0)
   1023 	if e1 != 0 {
   1024 		err = errnoErr(e1)
   1025 	}
   1026 	return
   1027 }
   1028 
   1029 func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
   1030 	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_getsockopt)), 5, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
   1031 	if e1 != 0 {
   1032 		err = errnoErr(e1)
   1033 	}
   1034 	return
   1035 }
   1036 
   1037 func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
   1038 	_, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&libc_getpeername)), 3, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
   1039 	if e1 != 0 {
   1040 		err = errnoErr(e1)
   1041 	}
   1042 	return
   1043 }
   1044 
   1045 func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
   1046 	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_getsockname)), 3, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
   1047 	if e1 != 0 {
   1048 		err = errnoErr(e1)
   1049 	}
   1050 	return
   1051 }
   1052 
   1053 func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
   1054 	_, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_setsockopt)), 5, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
   1055 	if e1 != 0 {
   1056 		err = errnoErr(e1)
   1057 	}
   1058 	return
   1059 }
   1060 
   1061 func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
   1062 	var _p0 *byte
   1063 	if len(p) > 0 {
   1064 		_p0 = &p[0]
   1065 	}
   1066 	r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_recvfrom)), 6, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
   1067 	n = int(r0)
   1068 	if e1 != 0 {
   1069 		err = errnoErr(e1)
   1070 	}
   1071 	return
   1072 }
   1073 
   1074 func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
   1075 	r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&libc_recvmsg)), 3, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0)
   1076 	n = int(r0)
   1077 	if e1 != 0 {
   1078 		err = errnoErr(e1)
   1079 	}
   1080 	return
   1081 }
   1082