Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 

1698 rader
46 KiB

  1. // mksyscall_solaris.pl -tags solaris,amd64 syscall_solaris.go syscall_solaris_amd64.go
  2. // Code generated by the command above; see README.md. DO NOT EDIT.
  3. // +build solaris,amd64
  4. package unix
  5. import (
  6. "syscall"
  7. "unsafe"
  8. )
  9. //go:cgo_import_dynamic libc_pipe pipe "libc.so"
  10. //go:cgo_import_dynamic libc_getsockname getsockname "libsocket.so"
  11. //go:cgo_import_dynamic libc_getcwd getcwd "libc.so"
  12. //go:cgo_import_dynamic libc_getgroups getgroups "libc.so"
  13. //go:cgo_import_dynamic libc_setgroups setgroups "libc.so"
  14. //go:cgo_import_dynamic libc_wait4 wait4 "libc.so"
  15. //go:cgo_import_dynamic libc_gethostname gethostname "libc.so"
  16. //go:cgo_import_dynamic libc_utimes utimes "libc.so"
  17. //go:cgo_import_dynamic libc_utimensat utimensat "libc.so"
  18. //go:cgo_import_dynamic libc_fcntl fcntl "libc.so"
  19. //go:cgo_import_dynamic libc_futimesat futimesat "libc.so"
  20. //go:cgo_import_dynamic libc_accept accept "libsocket.so"
  21. //go:cgo_import_dynamic libc___xnet_recvmsg __xnet_recvmsg "libsocket.so"
  22. //go:cgo_import_dynamic libc___xnet_sendmsg __xnet_sendmsg "libsocket.so"
  23. //go:cgo_import_dynamic libc_acct acct "libc.so"
  24. //go:cgo_import_dynamic libc___makedev __makedev "libc.so"
  25. //go:cgo_import_dynamic libc___major __major "libc.so"
  26. //go:cgo_import_dynamic libc___minor __minor "libc.so"
  27. //go:cgo_import_dynamic libc_ioctl ioctl "libc.so"
  28. //go:cgo_import_dynamic libc_poll poll "libc.so"
  29. //go:cgo_import_dynamic libc_access access "libc.so"
  30. //go:cgo_import_dynamic libc_adjtime adjtime "libc.so"
  31. //go:cgo_import_dynamic libc_chdir chdir "libc.so"
  32. //go:cgo_import_dynamic libc_chmod chmod "libc.so"
  33. //go:cgo_import_dynamic libc_chown chown "libc.so"
  34. //go:cgo_import_dynamic libc_chroot chroot "libc.so"
  35. //go:cgo_import_dynamic libc_close close "libc.so"
  36. //go:cgo_import_dynamic libc_creat creat "libc.so"
  37. //go:cgo_import_dynamic libc_dup dup "libc.so"
  38. //go:cgo_import_dynamic libc_dup2 dup2 "libc.so"
  39. //go:cgo_import_dynamic libc_exit exit "libc.so"
  40. //go:cgo_import_dynamic libc_faccessat faccessat "libc.so"
  41. //go:cgo_import_dynamic libc_fchdir fchdir "libc.so"
  42. //go:cgo_import_dynamic libc_fchmod fchmod "libc.so"
  43. //go:cgo_import_dynamic libc_fchmodat fchmodat "libc.so"
  44. //go:cgo_import_dynamic libc_fchown fchown "libc.so"
  45. //go:cgo_import_dynamic libc_fchownat fchownat "libc.so"
  46. //go:cgo_import_dynamic libc_fdatasync fdatasync "libc.so"
  47. //go:cgo_import_dynamic libc_flock flock "libc.so"
  48. //go:cgo_import_dynamic libc_fpathconf fpathconf "libc.so"
  49. //go:cgo_import_dynamic libc_fstat fstat "libc.so"
  50. //go:cgo_import_dynamic libc_fstatat fstatat "libc.so"
  51. //go:cgo_import_dynamic libc_fstatvfs fstatvfs "libc.so"
  52. //go:cgo_import_dynamic libc_getdents getdents "libc.so"
  53. //go:cgo_import_dynamic libc_getgid getgid "libc.so"
  54. //go:cgo_import_dynamic libc_getpid getpid "libc.so"
  55. //go:cgo_import_dynamic libc_getpgid getpgid "libc.so"
  56. //go:cgo_import_dynamic libc_getpgrp getpgrp "libc.so"
  57. //go:cgo_import_dynamic libc_geteuid geteuid "libc.so"
  58. //go:cgo_import_dynamic libc_getegid getegid "libc.so"
  59. //go:cgo_import_dynamic libc_getppid getppid "libc.so"
  60. //go:cgo_import_dynamic libc_getpriority getpriority "libc.so"
  61. //go:cgo_import_dynamic libc_getrlimit getrlimit "libc.so"
  62. //go:cgo_import_dynamic libc_getrusage getrusage "libc.so"
  63. //go:cgo_import_dynamic libc_gettimeofday gettimeofday "libc.so"
  64. //go:cgo_import_dynamic libc_getuid getuid "libc.so"
  65. //go:cgo_import_dynamic libc_kill kill "libc.so"
  66. //go:cgo_import_dynamic libc_lchown lchown "libc.so"
  67. //go:cgo_import_dynamic libc_link link "libc.so"
  68. //go:cgo_import_dynamic libc___xnet_llisten __xnet_llisten "libsocket.so"
  69. //go:cgo_import_dynamic libc_lstat lstat "libc.so"
  70. //go:cgo_import_dynamic libc_madvise madvise "libc.so"
  71. //go:cgo_import_dynamic libc_mkdir mkdir "libc.so"
  72. //go:cgo_import_dynamic libc_mkdirat mkdirat "libc.so"
  73. //go:cgo_import_dynamic libc_mkfifo mkfifo "libc.so"
  74. //go:cgo_import_dynamic libc_mkfifoat mkfifoat "libc.so"
  75. //go:cgo_import_dynamic libc_mknod mknod "libc.so"
  76. //go:cgo_import_dynamic libc_mknodat mknodat "libc.so"
  77. //go:cgo_import_dynamic libc_mlock mlock "libc.so"
  78. //go:cgo_import_dynamic libc_mlockall mlockall "libc.so"
  79. //go:cgo_import_dynamic libc_mprotect mprotect "libc.so"
  80. //go:cgo_import_dynamic libc_msync msync "libc.so"
  81. //go:cgo_import_dynamic libc_munlock munlock "libc.so"
  82. //go:cgo_import_dynamic libc_munlockall munlockall "libc.so"
  83. //go:cgo_import_dynamic libc_nanosleep nanosleep "libc.so"
  84. //go:cgo_import_dynamic libc_open open "libc.so"
  85. //go:cgo_import_dynamic libc_openat openat "libc.so"
  86. //go:cgo_import_dynamic libc_pathconf pathconf "libc.so"
  87. //go:cgo_import_dynamic libc_pause pause "libc.so"
  88. //go:cgo_import_dynamic libc_pread pread "libc.so"
  89. //go:cgo_import_dynamic libc_pwrite pwrite "libc.so"
  90. //go:cgo_import_dynamic libc_read read "libc.so"
  91. //go:cgo_import_dynamic libc_readlink readlink "libc.so"
  92. //go:cgo_import_dynamic libc_rename rename "libc.so"
  93. //go:cgo_import_dynamic libc_renameat renameat "libc.so"
  94. //go:cgo_import_dynamic libc_rmdir rmdir "libc.so"
  95. //go:cgo_import_dynamic libc_lseek lseek "libc.so"
  96. //go:cgo_import_dynamic libc_select select "libc.so"
  97. //go:cgo_import_dynamic libc_setegid setegid "libc.so"
  98. //go:cgo_import_dynamic libc_seteuid seteuid "libc.so"
  99. //go:cgo_import_dynamic libc_setgid setgid "libc.so"
  100. //go:cgo_import_dynamic libc_sethostname sethostname "libc.so"
  101. //go:cgo_import_dynamic libc_setpgid setpgid "libc.so"
  102. //go:cgo_import_dynamic libc_setpriority setpriority "libc.so"
  103. //go:cgo_import_dynamic libc_setregid setregid "libc.so"
  104. //go:cgo_import_dynamic libc_setreuid setreuid "libc.so"
  105. //go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so"
  106. //go:cgo_import_dynamic libc_setsid setsid "libc.so"
  107. //go:cgo_import_dynamic libc_setuid setuid "libc.so"
  108. //go:cgo_import_dynamic libc_shutdown shutdown "libsocket.so"
  109. //go:cgo_import_dynamic libc_stat stat "libc.so"
  110. //go:cgo_import_dynamic libc_statvfs statvfs "libc.so"
  111. //go:cgo_import_dynamic libc_symlink symlink "libc.so"
  112. //go:cgo_import_dynamic libc_sync sync "libc.so"
  113. //go:cgo_import_dynamic libc_times times "libc.so"
  114. //go:cgo_import_dynamic libc_truncate truncate "libc.so"
  115. //go:cgo_import_dynamic libc_fsync fsync "libc.so"
  116. //go:cgo_import_dynamic libc_ftruncate ftruncate "libc.so"
  117. //go:cgo_import_dynamic libc_umask umask "libc.so"
  118. //go:cgo_import_dynamic libc_uname uname "libc.so"
  119. //go:cgo_import_dynamic libc_umount umount "libc.so"
  120. //go:cgo_import_dynamic libc_unlink unlink "libc.so"
  121. //go:cgo_import_dynamic libc_unlinkat unlinkat "libc.so"
  122. //go:cgo_import_dynamic libc_ustat ustat "libc.so"
  123. //go:cgo_import_dynamic libc_utime utime "libc.so"
  124. //go:cgo_import_dynamic libc___xnet_bind __xnet_bind "libsocket.so"
  125. //go:cgo_import_dynamic libc___xnet_connect __xnet_connect "libsocket.so"
  126. //go:cgo_import_dynamic libc_mmap mmap "libc.so"
  127. //go:cgo_import_dynamic libc_munmap munmap "libc.so"
  128. //go:cgo_import_dynamic libc_sendfile sendfile "libsendfile.so"
  129. //go:cgo_import_dynamic libc___xnet_sendto __xnet_sendto "libsocket.so"
  130. //go:cgo_import_dynamic libc___xnet_socket __xnet_socket "libsocket.so"
  131. //go:cgo_import_dynamic libc___xnet_socketpair __xnet_socketpair "libsocket.so"
  132. //go:cgo_import_dynamic libc_write write "libc.so"
  133. //go:cgo_import_dynamic libc___xnet_getsockopt __xnet_getsockopt "libsocket.so"
  134. //go:cgo_import_dynamic libc_getpeername getpeername "libsocket.so"
  135. //go:cgo_import_dynamic libc_setsockopt setsockopt "libsocket.so"
  136. //go:cgo_import_dynamic libc_recvfrom recvfrom "libsocket.so"
  137. //go:linkname procpipe libc_pipe
  138. //go:linkname procgetsockname libc_getsockname
  139. //go:linkname procGetcwd libc_getcwd
  140. //go:linkname procgetgroups libc_getgroups
  141. //go:linkname procsetgroups libc_setgroups
  142. //go:linkname procwait4 libc_wait4
  143. //go:linkname procgethostname libc_gethostname
  144. //go:linkname procutimes libc_utimes
  145. //go:linkname procutimensat libc_utimensat
  146. //go:linkname procfcntl libc_fcntl
  147. //go:linkname procfutimesat libc_futimesat
  148. //go:linkname procaccept libc_accept
  149. //go:linkname proc__xnet_recvmsg libc___xnet_recvmsg
  150. //go:linkname proc__xnet_sendmsg libc___xnet_sendmsg
  151. //go:linkname procacct libc_acct
  152. //go:linkname proc__makedev libc___makedev
  153. //go:linkname proc__major libc___major
  154. //go:linkname proc__minor libc___minor
  155. //go:linkname procioctl libc_ioctl
  156. //go:linkname procpoll libc_poll
  157. //go:linkname procAccess libc_access
  158. //go:linkname procAdjtime libc_adjtime
  159. //go:linkname procChdir libc_chdir
  160. //go:linkname procChmod libc_chmod
  161. //go:linkname procChown libc_chown
  162. //go:linkname procChroot libc_chroot
  163. //go:linkname procClose libc_close
  164. //go:linkname procCreat libc_creat
  165. //go:linkname procDup libc_dup
  166. //go:linkname procDup2 libc_dup2
  167. //go:linkname procExit libc_exit
  168. //go:linkname procFaccessat libc_faccessat
  169. //go:linkname procFchdir libc_fchdir
  170. //go:linkname procFchmod libc_fchmod
  171. //go:linkname procFchmodat libc_fchmodat
  172. //go:linkname procFchown libc_fchown
  173. //go:linkname procFchownat libc_fchownat
  174. //go:linkname procFdatasync libc_fdatasync
  175. //go:linkname procFlock libc_flock
  176. //go:linkname procFpathconf libc_fpathconf
  177. //go:linkname procFstat libc_fstat
  178. //go:linkname procFstatat libc_fstatat
  179. //go:linkname procFstatvfs libc_fstatvfs
  180. //go:linkname procGetdents libc_getdents
  181. //go:linkname procGetgid libc_getgid
  182. //go:linkname procGetpid libc_getpid
  183. //go:linkname procGetpgid libc_getpgid
  184. //go:linkname procGetpgrp libc_getpgrp
  185. //go:linkname procGeteuid libc_geteuid
  186. //go:linkname procGetegid libc_getegid
  187. //go:linkname procGetppid libc_getppid
  188. //go:linkname procGetpriority libc_getpriority
  189. //go:linkname procGetrlimit libc_getrlimit
  190. //go:linkname procGetrusage libc_getrusage
  191. //go:linkname procGettimeofday libc_gettimeofday
  192. //go:linkname procGetuid libc_getuid
  193. //go:linkname procKill libc_kill
  194. //go:linkname procLchown libc_lchown
  195. //go:linkname procLink libc_link
  196. //go:linkname proc__xnet_llisten libc___xnet_llisten
  197. //go:linkname procLstat libc_lstat
  198. //go:linkname procMadvise libc_madvise
  199. //go:linkname procMkdir libc_mkdir
  200. //go:linkname procMkdirat libc_mkdirat
  201. //go:linkname procMkfifo libc_mkfifo
  202. //go:linkname procMkfifoat libc_mkfifoat
  203. //go:linkname procMknod libc_mknod
  204. //go:linkname procMknodat libc_mknodat
  205. //go:linkname procMlock libc_mlock
  206. //go:linkname procMlockall libc_mlockall
  207. //go:linkname procMprotect libc_mprotect
  208. //go:linkname procMsync libc_msync
  209. //go:linkname procMunlock libc_munlock
  210. //go:linkname procMunlockall libc_munlockall
  211. //go:linkname procNanosleep libc_nanosleep
  212. //go:linkname procOpen libc_open
  213. //go:linkname procOpenat libc_openat
  214. //go:linkname procPathconf libc_pathconf
  215. //go:linkname procPause libc_pause
  216. //go:linkname procPread libc_pread
  217. //go:linkname procPwrite libc_pwrite
  218. //go:linkname procread libc_read
  219. //go:linkname procReadlink libc_readlink
  220. //go:linkname procRename libc_rename
  221. //go:linkname procRenameat libc_renameat
  222. //go:linkname procRmdir libc_rmdir
  223. //go:linkname proclseek libc_lseek
  224. //go:linkname procSelect libc_select
  225. //go:linkname procSetegid libc_setegid
  226. //go:linkname procSeteuid libc_seteuid
  227. //go:linkname procSetgid libc_setgid
  228. //go:linkname procSethostname libc_sethostname
  229. //go:linkname procSetpgid libc_setpgid
  230. //go:linkname procSetpriority libc_setpriority
  231. //go:linkname procSetregid libc_setregid
  232. //go:linkname procSetreuid libc_setreuid
  233. //go:linkname procSetrlimit libc_setrlimit
  234. //go:linkname procSetsid libc_setsid
  235. //go:linkname procSetuid libc_setuid
  236. //go:linkname procshutdown libc_shutdown
  237. //go:linkname procStat libc_stat
  238. //go:linkname procStatvfs libc_statvfs
  239. //go:linkname procSymlink libc_symlink
  240. //go:linkname procSync libc_sync
  241. //go:linkname procTimes libc_times
  242. //go:linkname procTruncate libc_truncate
  243. //go:linkname procFsync libc_fsync
  244. //go:linkname procFtruncate libc_ftruncate
  245. //go:linkname procUmask libc_umask
  246. //go:linkname procUname libc_uname
  247. //go:linkname procumount libc_umount
  248. //go:linkname procUnlink libc_unlink
  249. //go:linkname procUnlinkat libc_unlinkat
  250. //go:linkname procUstat libc_ustat
  251. //go:linkname procUtime libc_utime
  252. //go:linkname proc__xnet_bind libc___xnet_bind
  253. //go:linkname proc__xnet_connect libc___xnet_connect
  254. //go:linkname procmmap libc_mmap
  255. //go:linkname procmunmap libc_munmap
  256. //go:linkname procsendfile libc_sendfile
  257. //go:linkname proc__xnet_sendto libc___xnet_sendto
  258. //go:linkname proc__xnet_socket libc___xnet_socket
  259. //go:linkname proc__xnet_socketpair libc___xnet_socketpair
  260. //go:linkname procwrite libc_write
  261. //go:linkname proc__xnet_getsockopt libc___xnet_getsockopt
  262. //go:linkname procgetpeername libc_getpeername
  263. //go:linkname procsetsockopt libc_setsockopt
  264. //go:linkname procrecvfrom libc_recvfrom
  265. var (
  266. procpipe,
  267. procgetsockname,
  268. procGetcwd,
  269. procgetgroups,
  270. procsetgroups,
  271. procwait4,
  272. procgethostname,
  273. procutimes,
  274. procutimensat,
  275. procfcntl,
  276. procfutimesat,
  277. procaccept,
  278. proc__xnet_recvmsg,
  279. proc__xnet_sendmsg,
  280. procacct,
  281. proc__makedev,
  282. proc__major,
  283. proc__minor,
  284. procioctl,
  285. procpoll,
  286. procAccess,
  287. procAdjtime,
  288. procChdir,
  289. procChmod,
  290. procChown,
  291. procChroot,
  292. procClose,
  293. procCreat,
  294. procDup,
  295. procDup2,
  296. procExit,
  297. procFaccessat,
  298. procFchdir,
  299. procFchmod,
  300. procFchmodat,
  301. procFchown,
  302. procFchownat,
  303. procFdatasync,
  304. procFlock,
  305. procFpathconf,
  306. procFstat,
  307. procFstatat,
  308. procFstatvfs,
  309. procGetdents,
  310. procGetgid,
  311. procGetpid,
  312. procGetpgid,
  313. procGetpgrp,
  314. procGeteuid,
  315. procGetegid,
  316. procGetppid,
  317. procGetpriority,
  318. procGetrlimit,
  319. procGetrusage,
  320. procGettimeofday,
  321. procGetuid,
  322. procKill,
  323. procLchown,
  324. procLink,
  325. proc__xnet_llisten,
  326. procLstat,
  327. procMadvise,
  328. procMkdir,
  329. procMkdirat,
  330. procMkfifo,
  331. procMkfifoat,
  332. procMknod,
  333. procMknodat,
  334. procMlock,
  335. procMlockall,
  336. procMprotect,
  337. procMsync,
  338. procMunlock,
  339. procMunlockall,
  340. procNanosleep,
  341. procOpen,
  342. procOpenat,
  343. procPathconf,
  344. procPause,
  345. procPread,
  346. procPwrite,
  347. procread,
  348. procReadlink,
  349. procRename,
  350. procRenameat,
  351. procRmdir,
  352. proclseek,
  353. procSelect,
  354. procSetegid,
  355. procSeteuid,
  356. procSetgid,
  357. procSethostname,
  358. procSetpgid,
  359. procSetpriority,
  360. procSetregid,
  361. procSetreuid,
  362. procSetrlimit,
  363. procSetsid,
  364. procSetuid,
  365. procshutdown,
  366. procStat,
  367. procStatvfs,
  368. procSymlink,
  369. procSync,
  370. procTimes,
  371. procTruncate,
  372. procFsync,
  373. procFtruncate,
  374. procUmask,
  375. procUname,
  376. procumount,
  377. procUnlink,
  378. procUnlinkat,
  379. procUstat,
  380. procUtime,
  381. proc__xnet_bind,
  382. proc__xnet_connect,
  383. procmmap,
  384. procmunmap,
  385. procsendfile,
  386. proc__xnet_sendto,
  387. proc__xnet_socket,
  388. proc__xnet_socketpair,
  389. procwrite,
  390. proc__xnet_getsockopt,
  391. procgetpeername,
  392. procsetsockopt,
  393. procrecvfrom syscallFunc
  394. )
  395. func pipe(p *[2]_C_int) (n int, err error) {
  396. r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procpipe)), 1, uintptr(unsafe.Pointer(p)), 0, 0, 0, 0, 0)
  397. n = int(r0)
  398. if e1 != 0 {
  399. err = e1
  400. }
  401. return
  402. }
  403. func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  404. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgetsockname)), 3, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
  405. if e1 != 0 {
  406. err = e1
  407. }
  408. return
  409. }
  410. func Getcwd(buf []byte) (n int, err error) {
  411. var _p0 *byte
  412. if len(buf) > 0 {
  413. _p0 = &buf[0]
  414. }
  415. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procGetcwd)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), 0, 0, 0, 0)
  416. n = int(r0)
  417. if e1 != 0 {
  418. err = e1
  419. }
  420. return
  421. }
  422. func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
  423. r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procgetgroups)), 2, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0, 0, 0, 0)
  424. n = int(r0)
  425. if e1 != 0 {
  426. err = e1
  427. }
  428. return
  429. }
  430. func setgroups(ngid int, gid *_Gid_t) (err error) {
  431. _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procsetgroups)), 2, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0, 0, 0, 0)
  432. if e1 != 0 {
  433. err = e1
  434. }
  435. return
  436. }
  437. func wait4(pid int32, statusp *_C_int, options int, rusage *Rusage) (wpid int32, err error) {
  438. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procwait4)), 4, uintptr(pid), uintptr(unsafe.Pointer(statusp)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
  439. wpid = int32(r0)
  440. if e1 != 0 {
  441. err = e1
  442. }
  443. return
  444. }
  445. func gethostname(buf []byte) (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(&procgethostname)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), 0, 0, 0, 0)
  451. n = int(r0)
  452. if e1 != 0 {
  453. err = e1
  454. }
  455. return
  456. }
  457. func utimes(path string, times *[2]Timeval) (err error) {
  458. var _p0 *byte
  459. _p0, err = BytePtrFromString(path)
  460. if err != nil {
  461. return
  462. }
  463. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procutimes)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0, 0, 0, 0)
  464. if e1 != 0 {
  465. err = e1
  466. }
  467. return
  468. }
  469. func utimensat(fd int, path string, times *[2]Timespec, flag int) (err error) {
  470. var _p0 *byte
  471. _p0, err = BytePtrFromString(path)
  472. if err != nil {
  473. return
  474. }
  475. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procutimensat)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flag), 0, 0)
  476. if e1 != 0 {
  477. err = e1
  478. }
  479. return
  480. }
  481. func fcntl(fd int, cmd int, arg int) (val int, err error) {
  482. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procfcntl)), 3, uintptr(fd), uintptr(cmd), uintptr(arg), 0, 0, 0)
  483. val = int(r0)
  484. if e1 != 0 {
  485. err = e1
  486. }
  487. return
  488. }
  489. func futimesat(fildes int, path *byte, times *[2]Timeval) (err error) {
  490. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procfutimesat)), 3, uintptr(fildes), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)), 0, 0, 0)
  491. if e1 != 0 {
  492. err = e1
  493. }
  494. return
  495. }
  496. func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
  497. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procaccept)), 3, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
  498. fd = int(r0)
  499. if e1 != 0 {
  500. err = e1
  501. }
  502. return
  503. }
  504. func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  505. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_recvmsg)), 3, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0)
  506. n = int(r0)
  507. if e1 != 0 {
  508. err = e1
  509. }
  510. return
  511. }
  512. func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
  513. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_sendmsg)), 3, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0)
  514. n = int(r0)
  515. if e1 != 0 {
  516. err = e1
  517. }
  518. return
  519. }
  520. func acct(path *byte) (err error) {
  521. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procacct)), 1, uintptr(unsafe.Pointer(path)), 0, 0, 0, 0, 0)
  522. if e1 != 0 {
  523. err = e1
  524. }
  525. return
  526. }
  527. func __makedev(version int, major uint, minor uint) (val uint64) {
  528. r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&proc__makedev)), 3, uintptr(version), uintptr(major), uintptr(minor), 0, 0, 0)
  529. val = uint64(r0)
  530. return
  531. }
  532. func __major(version int, dev uint64) (val uint) {
  533. r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&proc__major)), 2, uintptr(version), uintptr(dev), 0, 0, 0, 0)
  534. val = uint(r0)
  535. return
  536. }
  537. func __minor(version int, dev uint64) (val uint) {
  538. r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&proc__minor)), 2, uintptr(version), uintptr(dev), 0, 0, 0, 0)
  539. val = uint(r0)
  540. return
  541. }
  542. func ioctl(fd int, req uint, arg uintptr) (err error) {
  543. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procioctl)), 3, uintptr(fd), uintptr(req), uintptr(arg), 0, 0, 0)
  544. if e1 != 0 {
  545. err = e1
  546. }
  547. return
  548. }
  549. func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
  550. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procpoll)), 3, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout), 0, 0, 0)
  551. n = int(r0)
  552. if e1 != 0 {
  553. err = e1
  554. }
  555. return
  556. }
  557. func Access(path string, mode uint32) (err error) {
  558. var _p0 *byte
  559. _p0, err = BytePtrFromString(path)
  560. if err != nil {
  561. return
  562. }
  563. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procAccess)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)
  564. if e1 != 0 {
  565. err = e1
  566. }
  567. return
  568. }
  569. func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
  570. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procAdjtime)), 2, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0, 0, 0, 0)
  571. if e1 != 0 {
  572. err = e1
  573. }
  574. return
  575. }
  576. func Chdir(path string) (err error) {
  577. var _p0 *byte
  578. _p0, err = BytePtrFromString(path)
  579. if err != nil {
  580. return
  581. }
  582. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procChdir)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)
  583. if e1 != 0 {
  584. err = e1
  585. }
  586. return
  587. }
  588. func Chmod(path string, mode uint32) (err error) {
  589. var _p0 *byte
  590. _p0, err = BytePtrFromString(path)
  591. if err != nil {
  592. return
  593. }
  594. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procChmod)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)
  595. if e1 != 0 {
  596. err = e1
  597. }
  598. return
  599. }
  600. func Chown(path string, uid int, gid int) (err error) {
  601. var _p0 *byte
  602. _p0, err = BytePtrFromString(path)
  603. if err != nil {
  604. return
  605. }
  606. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procChown)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), 0, 0, 0)
  607. if e1 != 0 {
  608. err = e1
  609. }
  610. return
  611. }
  612. func Chroot(path string) (err error) {
  613. var _p0 *byte
  614. _p0, err = BytePtrFromString(path)
  615. if err != nil {
  616. return
  617. }
  618. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procChroot)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)
  619. if e1 != 0 {
  620. err = e1
  621. }
  622. return
  623. }
  624. func Close(fd int) (err error) {
  625. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procClose)), 1, uintptr(fd), 0, 0, 0, 0, 0)
  626. if e1 != 0 {
  627. err = e1
  628. }
  629. return
  630. }
  631. func Creat(path string, mode uint32) (fd int, err error) {
  632. var _p0 *byte
  633. _p0, err = BytePtrFromString(path)
  634. if err != nil {
  635. return
  636. }
  637. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procCreat)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)
  638. fd = int(r0)
  639. if e1 != 0 {
  640. err = e1
  641. }
  642. return
  643. }
  644. func Dup(fd int) (nfd int, err error) {
  645. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procDup)), 1, uintptr(fd), 0, 0, 0, 0, 0)
  646. nfd = int(r0)
  647. if e1 != 0 {
  648. err = e1
  649. }
  650. return
  651. }
  652. func Dup2(oldfd int, newfd int) (err error) {
  653. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procDup2)), 2, uintptr(oldfd), uintptr(newfd), 0, 0, 0, 0)
  654. if e1 != 0 {
  655. err = e1
  656. }
  657. return
  658. }
  659. func Exit(code int) {
  660. sysvicall6(uintptr(unsafe.Pointer(&procExit)), 1, uintptr(code), 0, 0, 0, 0, 0)
  661. return
  662. }
  663. func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
  664. var _p0 *byte
  665. _p0, err = BytePtrFromString(path)
  666. if err != nil {
  667. return
  668. }
  669. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFaccessat)), 4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
  670. if e1 != 0 {
  671. err = e1
  672. }
  673. return
  674. }
  675. func Fchdir(fd int) (err error) {
  676. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchdir)), 1, uintptr(fd), 0, 0, 0, 0, 0)
  677. if e1 != 0 {
  678. err = e1
  679. }
  680. return
  681. }
  682. func Fchmod(fd int, mode uint32) (err error) {
  683. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchmod)), 2, uintptr(fd), uintptr(mode), 0, 0, 0, 0)
  684. if e1 != 0 {
  685. err = e1
  686. }
  687. return
  688. }
  689. func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
  690. var _p0 *byte
  691. _p0, err = BytePtrFromString(path)
  692. if err != nil {
  693. return
  694. }
  695. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchmodat)), 4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
  696. if e1 != 0 {
  697. err = e1
  698. }
  699. return
  700. }
  701. func Fchown(fd int, uid int, gid int) (err error) {
  702. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchown)), 3, uintptr(fd), uintptr(uid), uintptr(gid), 0, 0, 0)
  703. if e1 != 0 {
  704. err = e1
  705. }
  706. return
  707. }
  708. func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
  709. var _p0 *byte
  710. _p0, err = BytePtrFromString(path)
  711. if err != nil {
  712. return
  713. }
  714. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchownat)), 5, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
  715. if e1 != 0 {
  716. err = e1
  717. }
  718. return
  719. }
  720. func Fdatasync(fd int) (err error) {
  721. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFdatasync)), 1, uintptr(fd), 0, 0, 0, 0, 0)
  722. if e1 != 0 {
  723. err = e1
  724. }
  725. return
  726. }
  727. func Flock(fd int, how int) (err error) {
  728. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFlock)), 2, uintptr(fd), uintptr(how), 0, 0, 0, 0)
  729. if e1 != 0 {
  730. err = e1
  731. }
  732. return
  733. }
  734. func Fpathconf(fd int, name int) (val int, err error) {
  735. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFpathconf)), 2, uintptr(fd), uintptr(name), 0, 0, 0, 0)
  736. val = int(r0)
  737. if e1 != 0 {
  738. err = e1
  739. }
  740. return
  741. }
  742. func Fstat(fd int, stat *Stat_t) (err error) {
  743. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFstat)), 2, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0)
  744. if e1 != 0 {
  745. err = e1
  746. }
  747. return
  748. }
  749. func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
  750. var _p0 *byte
  751. _p0, err = BytePtrFromString(path)
  752. if err != nil {
  753. return
  754. }
  755. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFstatat)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
  756. if e1 != 0 {
  757. err = e1
  758. }
  759. return
  760. }
  761. func Fstatvfs(fd int, vfsstat *Statvfs_t) (err error) {
  762. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFstatvfs)), 2, uintptr(fd), uintptr(unsafe.Pointer(vfsstat)), 0, 0, 0, 0)
  763. if e1 != 0 {
  764. err = e1
  765. }
  766. return
  767. }
  768. func Getdents(fd int, buf []byte, basep *uintptr) (n int, err error) {
  769. var _p0 *byte
  770. if len(buf) > 0 {
  771. _p0 = &buf[0]
  772. }
  773. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procGetdents)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
  774. n = int(r0)
  775. if e1 != 0 {
  776. err = e1
  777. }
  778. return
  779. }
  780. func Getgid() (gid int) {
  781. r0, _, _ := rawSysvicall6(uintptr(unsafe.Pointer(&procGetgid)), 0, 0, 0, 0, 0, 0, 0)
  782. gid = int(r0)
  783. return
  784. }
  785. func Getpid() (pid int) {
  786. r0, _, _ := rawSysvicall6(uintptr(unsafe.Pointer(&procGetpid)), 0, 0, 0, 0, 0, 0, 0)
  787. pid = int(r0)
  788. return
  789. }
  790. func Getpgid(pid int) (pgid int, err error) {
  791. r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetpgid)), 1, uintptr(pid), 0, 0, 0, 0, 0)
  792. pgid = int(r0)
  793. if e1 != 0 {
  794. err = e1
  795. }
  796. return
  797. }
  798. func Getpgrp() (pgid int, err error) {
  799. r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetpgrp)), 0, 0, 0, 0, 0, 0, 0)
  800. pgid = int(r0)
  801. if e1 != 0 {
  802. err = e1
  803. }
  804. return
  805. }
  806. func Geteuid() (euid int) {
  807. r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procGeteuid)), 0, 0, 0, 0, 0, 0, 0)
  808. euid = int(r0)
  809. return
  810. }
  811. func Getegid() (egid int) {
  812. r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procGetegid)), 0, 0, 0, 0, 0, 0, 0)
  813. egid = int(r0)
  814. return
  815. }
  816. func Getppid() (ppid int) {
  817. r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procGetppid)), 0, 0, 0, 0, 0, 0, 0)
  818. ppid = int(r0)
  819. return
  820. }
  821. func Getpriority(which int, who int) (n int, err error) {
  822. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procGetpriority)), 2, uintptr(which), uintptr(who), 0, 0, 0, 0)
  823. n = int(r0)
  824. if e1 != 0 {
  825. err = e1
  826. }
  827. return
  828. }
  829. func Getrlimit(which int, lim *Rlimit) (err error) {
  830. _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetrlimit)), 2, uintptr(which), uintptr(unsafe.Pointer(lim)), 0, 0, 0, 0)
  831. if e1 != 0 {
  832. err = e1
  833. }
  834. return
  835. }
  836. func Getrusage(who int, rusage *Rusage) (err error) {
  837. _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetrusage)), 2, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0, 0, 0, 0)
  838. if e1 != 0 {
  839. err = e1
  840. }
  841. return
  842. }
  843. func Gettimeofday(tv *Timeval) (err error) {
  844. _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGettimeofday)), 1, uintptr(unsafe.Pointer(tv)), 0, 0, 0, 0, 0)
  845. if e1 != 0 {
  846. err = e1
  847. }
  848. return
  849. }
  850. func Getuid() (uid int) {
  851. r0, _, _ := rawSysvicall6(uintptr(unsafe.Pointer(&procGetuid)), 0, 0, 0, 0, 0, 0, 0)
  852. uid = int(r0)
  853. return
  854. }
  855. func Kill(pid int, signum syscall.Signal) (err error) {
  856. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procKill)), 2, uintptr(pid), uintptr(signum), 0, 0, 0, 0)
  857. if e1 != 0 {
  858. err = e1
  859. }
  860. return
  861. }
  862. func Lchown(path string, uid int, gid int) (err error) {
  863. var _p0 *byte
  864. _p0, err = BytePtrFromString(path)
  865. if err != nil {
  866. return
  867. }
  868. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procLchown)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), 0, 0, 0)
  869. if e1 != 0 {
  870. err = e1
  871. }
  872. return
  873. }
  874. func Link(path string, link string) (err error) {
  875. var _p0 *byte
  876. _p0, err = BytePtrFromString(path)
  877. if err != nil {
  878. return
  879. }
  880. var _p1 *byte
  881. _p1, err = BytePtrFromString(link)
  882. if err != nil {
  883. return
  884. }
  885. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procLink)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0)
  886. if e1 != 0 {
  887. err = e1
  888. }
  889. return
  890. }
  891. func Listen(s int, backlog int) (err error) {
  892. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_llisten)), 2, uintptr(s), uintptr(backlog), 0, 0, 0, 0)
  893. if e1 != 0 {
  894. err = e1
  895. }
  896. return
  897. }
  898. func Lstat(path string, stat *Stat_t) (err error) {
  899. var _p0 *byte
  900. _p0, err = BytePtrFromString(path)
  901. if err != nil {
  902. return
  903. }
  904. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procLstat)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0)
  905. if e1 != 0 {
  906. err = e1
  907. }
  908. return
  909. }
  910. func Madvise(b []byte, advice int) (err error) {
  911. var _p0 *byte
  912. if len(b) > 0 {
  913. _p0 = &b[0]
  914. }
  915. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMadvise)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), uintptr(advice), 0, 0, 0)
  916. if e1 != 0 {
  917. err = e1
  918. }
  919. return
  920. }
  921. func Mkdir(path string, mode uint32) (err error) {
  922. var _p0 *byte
  923. _p0, err = BytePtrFromString(path)
  924. if err != nil {
  925. return
  926. }
  927. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMkdir)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)
  928. if e1 != 0 {
  929. err = e1
  930. }
  931. return
  932. }
  933. func Mkdirat(dirfd int, path string, mode uint32) (err error) {
  934. var _p0 *byte
  935. _p0, err = BytePtrFromString(path)
  936. if err != nil {
  937. return
  938. }
  939. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMkdirat)), 3, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0)
  940. if e1 != 0 {
  941. err = e1
  942. }
  943. return
  944. }
  945. func Mkfifo(path string, mode uint32) (err error) {
  946. var _p0 *byte
  947. _p0, err = BytePtrFromString(path)
  948. if err != nil {
  949. return
  950. }
  951. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMkfifo)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0)
  952. if e1 != 0 {
  953. err = e1
  954. }
  955. return
  956. }
  957. func Mkfifoat(dirfd int, path string, mode uint32) (err error) {
  958. var _p0 *byte
  959. _p0, err = BytePtrFromString(path)
  960. if err != nil {
  961. return
  962. }
  963. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMkfifoat)), 3, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0)
  964. if e1 != 0 {
  965. err = e1
  966. }
  967. return
  968. }
  969. func Mknod(path string, mode uint32, dev int) (err error) {
  970. var _p0 *byte
  971. _p0, err = BytePtrFromString(path)
  972. if err != nil {
  973. return
  974. }
  975. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMknod)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0, 0)
  976. if e1 != 0 {
  977. err = e1
  978. }
  979. return
  980. }
  981. func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
  982. var _p0 *byte
  983. _p0, err = BytePtrFromString(path)
  984. if err != nil {
  985. return
  986. }
  987. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMknodat)), 4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
  988. if e1 != 0 {
  989. err = e1
  990. }
  991. return
  992. }
  993. func Mlock(b []byte) (err error) {
  994. var _p0 *byte
  995. if len(b) > 0 {
  996. _p0 = &b[0]
  997. }
  998. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMlock)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), 0, 0, 0, 0)
  999. if e1 != 0 {
  1000. err = e1
  1001. }
  1002. return
  1003. }
  1004. func Mlockall(flags int) (err error) {
  1005. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMlockall)), 1, uintptr(flags), 0, 0, 0, 0, 0)
  1006. if e1 != 0 {
  1007. err = e1
  1008. }
  1009. return
  1010. }
  1011. func Mprotect(b []byte, prot int) (err error) {
  1012. var _p0 *byte
  1013. if len(b) > 0 {
  1014. _p0 = &b[0]
  1015. }
  1016. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMprotect)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), uintptr(prot), 0, 0, 0)
  1017. if e1 != 0 {
  1018. err = e1
  1019. }
  1020. return
  1021. }
  1022. func Msync(b []byte, flags int) (err error) {
  1023. var _p0 *byte
  1024. if len(b) > 0 {
  1025. _p0 = &b[0]
  1026. }
  1027. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMsync)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), uintptr(flags), 0, 0, 0)
  1028. if e1 != 0 {
  1029. err = e1
  1030. }
  1031. return
  1032. }
  1033. func Munlock(b []byte) (err error) {
  1034. var _p0 *byte
  1035. if len(b) > 0 {
  1036. _p0 = &b[0]
  1037. }
  1038. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMunlock)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), 0, 0, 0, 0)
  1039. if e1 != 0 {
  1040. err = e1
  1041. }
  1042. return
  1043. }
  1044. func Munlockall() (err error) {
  1045. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMunlockall)), 0, 0, 0, 0, 0, 0, 0)
  1046. if e1 != 0 {
  1047. err = e1
  1048. }
  1049. return
  1050. }
  1051. func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
  1052. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procNanosleep)), 2, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0, 0, 0, 0)
  1053. if e1 != 0 {
  1054. err = e1
  1055. }
  1056. return
  1057. }
  1058. func Open(path string, mode int, perm uint32) (fd int, err error) {
  1059. var _p0 *byte
  1060. _p0, err = BytePtrFromString(path)
  1061. if err != nil {
  1062. return
  1063. }
  1064. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procOpen)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0, 0)
  1065. fd = int(r0)
  1066. if e1 != 0 {
  1067. err = e1
  1068. }
  1069. return
  1070. }
  1071. func Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
  1072. var _p0 *byte
  1073. _p0, err = BytePtrFromString(path)
  1074. if err != nil {
  1075. return
  1076. }
  1077. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procOpenat)), 4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
  1078. fd = int(r0)
  1079. if e1 != 0 {
  1080. err = e1
  1081. }
  1082. return
  1083. }
  1084. func Pathconf(path string, name int) (val int, err error) {
  1085. var _p0 *byte
  1086. _p0, err = BytePtrFromString(path)
  1087. if err != nil {
  1088. return
  1089. }
  1090. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procPathconf)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0, 0, 0, 0)
  1091. val = int(r0)
  1092. if e1 != 0 {
  1093. err = e1
  1094. }
  1095. return
  1096. }
  1097. func Pause() (err error) {
  1098. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procPause)), 0, 0, 0, 0, 0, 0, 0)
  1099. if e1 != 0 {
  1100. err = e1
  1101. }
  1102. return
  1103. }
  1104. func Pread(fd int, p []byte, offset int64) (n int, err error) {
  1105. var _p0 *byte
  1106. if len(p) > 0 {
  1107. _p0 = &p[0]
  1108. }
  1109. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procPread)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0)
  1110. n = int(r0)
  1111. if e1 != 0 {
  1112. err = e1
  1113. }
  1114. return
  1115. }
  1116. func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
  1117. var _p0 *byte
  1118. if len(p) > 0 {
  1119. _p0 = &p[0]
  1120. }
  1121. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procPwrite)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0)
  1122. n = int(r0)
  1123. if e1 != 0 {
  1124. err = e1
  1125. }
  1126. return
  1127. }
  1128. func read(fd int, p []byte) (n int, err error) {
  1129. var _p0 *byte
  1130. if len(p) > 0 {
  1131. _p0 = &p[0]
  1132. }
  1133. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procread)), 3, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0, 0, 0)
  1134. n = int(r0)
  1135. if e1 != 0 {
  1136. err = e1
  1137. }
  1138. return
  1139. }
  1140. func Readlink(path string, buf []byte) (n int, err error) {
  1141. var _p0 *byte
  1142. _p0, err = BytePtrFromString(path)
  1143. if err != nil {
  1144. return
  1145. }
  1146. var _p1 *byte
  1147. if len(buf) > 0 {
  1148. _p1 = &buf[0]
  1149. }
  1150. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procReadlink)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(len(buf)), 0, 0, 0)
  1151. n = int(r0)
  1152. if e1 != 0 {
  1153. err = e1
  1154. }
  1155. return
  1156. }
  1157. func Rename(from string, to string) (err error) {
  1158. var _p0 *byte
  1159. _p0, err = BytePtrFromString(from)
  1160. if err != nil {
  1161. return
  1162. }
  1163. var _p1 *byte
  1164. _p1, err = BytePtrFromString(to)
  1165. if err != nil {
  1166. return
  1167. }
  1168. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procRename)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0)
  1169. if e1 != 0 {
  1170. err = e1
  1171. }
  1172. return
  1173. }
  1174. func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
  1175. var _p0 *byte
  1176. _p0, err = BytePtrFromString(oldpath)
  1177. if err != nil {
  1178. return
  1179. }
  1180. var _p1 *byte
  1181. _p1, err = BytePtrFromString(newpath)
  1182. if err != nil {
  1183. return
  1184. }
  1185. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procRenameat)), 4, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
  1186. if e1 != 0 {
  1187. err = e1
  1188. }
  1189. return
  1190. }
  1191. func Rmdir(path string) (err error) {
  1192. var _p0 *byte
  1193. _p0, err = BytePtrFromString(path)
  1194. if err != nil {
  1195. return
  1196. }
  1197. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procRmdir)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)
  1198. if e1 != 0 {
  1199. err = e1
  1200. }
  1201. return
  1202. }
  1203. func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
  1204. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proclseek)), 3, uintptr(fd), uintptr(offset), uintptr(whence), 0, 0, 0)
  1205. newoffset = int64(r0)
  1206. if e1 != 0 {
  1207. err = e1
  1208. }
  1209. return
  1210. }
  1211. func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
  1212. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSelect)), 5, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
  1213. if e1 != 0 {
  1214. err = e1
  1215. }
  1216. return
  1217. }
  1218. func Setegid(egid int) (err error) {
  1219. _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetegid)), 1, uintptr(egid), 0, 0, 0, 0, 0)
  1220. if e1 != 0 {
  1221. err = e1
  1222. }
  1223. return
  1224. }
  1225. func Seteuid(euid int) (err error) {
  1226. _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSeteuid)), 1, uintptr(euid), 0, 0, 0, 0, 0)
  1227. if e1 != 0 {
  1228. err = e1
  1229. }
  1230. return
  1231. }
  1232. func Setgid(gid int) (err error) {
  1233. _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetgid)), 1, uintptr(gid), 0, 0, 0, 0, 0)
  1234. if e1 != 0 {
  1235. err = e1
  1236. }
  1237. return
  1238. }
  1239. func Sethostname(p []byte) (err error) {
  1240. var _p0 *byte
  1241. if len(p) > 0 {
  1242. _p0 = &p[0]
  1243. }
  1244. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSethostname)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0, 0, 0, 0)
  1245. if e1 != 0 {
  1246. err = e1
  1247. }
  1248. return
  1249. }
  1250. func Setpgid(pid int, pgid int) (err error) {
  1251. _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetpgid)), 2, uintptr(pid), uintptr(pgid), 0, 0, 0, 0)
  1252. if e1 != 0 {
  1253. err = e1
  1254. }
  1255. return
  1256. }
  1257. func Setpriority(which int, who int, prio int) (err error) {
  1258. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSetpriority)), 3, uintptr(which), uintptr(who), uintptr(prio), 0, 0, 0)
  1259. if e1 != 0 {
  1260. err = e1
  1261. }
  1262. return
  1263. }
  1264. func Setregid(rgid int, egid int) (err error) {
  1265. _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetregid)), 2, uintptr(rgid), uintptr(egid), 0, 0, 0, 0)
  1266. if e1 != 0 {
  1267. err = e1
  1268. }
  1269. return
  1270. }
  1271. func Setreuid(ruid int, euid int) (err error) {
  1272. _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetreuid)), 2, uintptr(ruid), uintptr(euid), 0, 0, 0, 0)
  1273. if e1 != 0 {
  1274. err = e1
  1275. }
  1276. return
  1277. }
  1278. func Setrlimit(which int, lim *Rlimit) (err error) {
  1279. _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetrlimit)), 2, uintptr(which), uintptr(unsafe.Pointer(lim)), 0, 0, 0, 0)
  1280. if e1 != 0 {
  1281. err = e1
  1282. }
  1283. return
  1284. }
  1285. func Setsid() (pid int, err error) {
  1286. r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetsid)), 0, 0, 0, 0, 0, 0, 0)
  1287. pid = int(r0)
  1288. if e1 != 0 {
  1289. err = e1
  1290. }
  1291. return
  1292. }
  1293. func Setuid(uid int) (err error) {
  1294. _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetuid)), 1, uintptr(uid), 0, 0, 0, 0, 0)
  1295. if e1 != 0 {
  1296. err = e1
  1297. }
  1298. return
  1299. }
  1300. func Shutdown(s int, how int) (err error) {
  1301. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procshutdown)), 2, uintptr(s), uintptr(how), 0, 0, 0, 0)
  1302. if e1 != 0 {
  1303. err = e1
  1304. }
  1305. return
  1306. }
  1307. func Stat(path string, stat *Stat_t) (err error) {
  1308. var _p0 *byte
  1309. _p0, err = BytePtrFromString(path)
  1310. if err != nil {
  1311. return
  1312. }
  1313. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procStat)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0)
  1314. if e1 != 0 {
  1315. err = e1
  1316. }
  1317. return
  1318. }
  1319. func Statvfs(path string, vfsstat *Statvfs_t) (err error) {
  1320. var _p0 *byte
  1321. _p0, err = BytePtrFromString(path)
  1322. if err != nil {
  1323. return
  1324. }
  1325. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procStatvfs)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(vfsstat)), 0, 0, 0, 0)
  1326. if e1 != 0 {
  1327. err = e1
  1328. }
  1329. return
  1330. }
  1331. func Symlink(path string, link string) (err error) {
  1332. var _p0 *byte
  1333. _p0, err = BytePtrFromString(path)
  1334. if err != nil {
  1335. return
  1336. }
  1337. var _p1 *byte
  1338. _p1, err = BytePtrFromString(link)
  1339. if err != nil {
  1340. return
  1341. }
  1342. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSymlink)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0)
  1343. if e1 != 0 {
  1344. err = e1
  1345. }
  1346. return
  1347. }
  1348. func Sync() (err error) {
  1349. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSync)), 0, 0, 0, 0, 0, 0, 0)
  1350. if e1 != 0 {
  1351. err = e1
  1352. }
  1353. return
  1354. }
  1355. func Times(tms *Tms) (ticks uintptr, err error) {
  1356. r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procTimes)), 1, uintptr(unsafe.Pointer(tms)), 0, 0, 0, 0, 0)
  1357. ticks = uintptr(r0)
  1358. if e1 != 0 {
  1359. err = e1
  1360. }
  1361. return
  1362. }
  1363. func Truncate(path string, length int64) (err error) {
  1364. var _p0 *byte
  1365. _p0, err = BytePtrFromString(path)
  1366. if err != nil {
  1367. return
  1368. }
  1369. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procTruncate)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0, 0, 0, 0)
  1370. if e1 != 0 {
  1371. err = e1
  1372. }
  1373. return
  1374. }
  1375. func Fsync(fd int) (err error) {
  1376. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFsync)), 1, uintptr(fd), 0, 0, 0, 0, 0)
  1377. if e1 != 0 {
  1378. err = e1
  1379. }
  1380. return
  1381. }
  1382. func Ftruncate(fd int, length int64) (err error) {
  1383. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFtruncate)), 2, uintptr(fd), uintptr(length), 0, 0, 0, 0)
  1384. if e1 != 0 {
  1385. err = e1
  1386. }
  1387. return
  1388. }
  1389. func Umask(mask int) (oldmask int) {
  1390. r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procUmask)), 1, uintptr(mask), 0, 0, 0, 0, 0)
  1391. oldmask = int(r0)
  1392. return
  1393. }
  1394. func Uname(buf *Utsname) (err error) {
  1395. _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procUname)), 1, uintptr(unsafe.Pointer(buf)), 0, 0, 0, 0, 0)
  1396. if e1 != 0 {
  1397. err = e1
  1398. }
  1399. return
  1400. }
  1401. func Unmount(target string, flags int) (err error) {
  1402. var _p0 *byte
  1403. _p0, err = BytePtrFromString(target)
  1404. if err != nil {
  1405. return
  1406. }
  1407. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procumount)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0, 0, 0, 0)
  1408. if e1 != 0 {
  1409. err = e1
  1410. }
  1411. return
  1412. }
  1413. func Unlink(path string) (err error) {
  1414. var _p0 *byte
  1415. _p0, err = BytePtrFromString(path)
  1416. if err != nil {
  1417. return
  1418. }
  1419. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procUnlink)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0)
  1420. if e1 != 0 {
  1421. err = e1
  1422. }
  1423. return
  1424. }
  1425. func Unlinkat(dirfd int, path string, flags int) (err error) {
  1426. var _p0 *byte
  1427. _p0, err = BytePtrFromString(path)
  1428. if err != nil {
  1429. return
  1430. }
  1431. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procUnlinkat)), 3, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0, 0, 0)
  1432. if e1 != 0 {
  1433. err = e1
  1434. }
  1435. return
  1436. }
  1437. func Ustat(dev int, ubuf *Ustat_t) (err error) {
  1438. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procUstat)), 2, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0, 0, 0, 0)
  1439. if e1 != 0 {
  1440. err = e1
  1441. }
  1442. return
  1443. }
  1444. func Utime(path string, buf *Utimbuf) (err error) {
  1445. var _p0 *byte
  1446. _p0, err = BytePtrFromString(path)
  1447. if err != nil {
  1448. return
  1449. }
  1450. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procUtime)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0, 0, 0, 0)
  1451. if e1 != 0 {
  1452. err = e1
  1453. }
  1454. return
  1455. }
  1456. func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  1457. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_bind)), 3, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0)
  1458. if e1 != 0 {
  1459. err = e1
  1460. }
  1461. return
  1462. }
  1463. func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
  1464. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_connect)), 3, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0)
  1465. if e1 != 0 {
  1466. err = e1
  1467. }
  1468. return
  1469. }
  1470. func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
  1471. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procmmap)), 6, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
  1472. ret = uintptr(r0)
  1473. if e1 != 0 {
  1474. err = e1
  1475. }
  1476. return
  1477. }
  1478. func munmap(addr uintptr, length uintptr) (err error) {
  1479. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procmunmap)), 2, uintptr(addr), uintptr(length), 0, 0, 0, 0)
  1480. if e1 != 0 {
  1481. err = e1
  1482. }
  1483. return
  1484. }
  1485. func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
  1486. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procsendfile)), 4, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
  1487. written = int(r0)
  1488. if e1 != 0 {
  1489. err = e1
  1490. }
  1491. return
  1492. }
  1493. func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
  1494. var _p0 *byte
  1495. if len(buf) > 0 {
  1496. _p0 = &buf[0]
  1497. }
  1498. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_sendto)), 6, uintptr(s), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
  1499. if e1 != 0 {
  1500. err = e1
  1501. }
  1502. return
  1503. }
  1504. func socket(domain int, typ int, proto int) (fd int, err error) {
  1505. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_socket)), 3, uintptr(domain), uintptr(typ), uintptr(proto), 0, 0, 0)
  1506. fd = int(r0)
  1507. if e1 != 0 {
  1508. err = e1
  1509. }
  1510. return
  1511. }
  1512. func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
  1513. _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&proc__xnet_socketpair)), 4, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
  1514. if e1 != 0 {
  1515. err = e1
  1516. }
  1517. return
  1518. }
  1519. func write(fd int, p []byte) (n int, err error) {
  1520. var _p0 *byte
  1521. if len(p) > 0 {
  1522. _p0 = &p[0]
  1523. }
  1524. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procwrite)), 3, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0, 0, 0)
  1525. n = int(r0)
  1526. if e1 != 0 {
  1527. err = e1
  1528. }
  1529. return
  1530. }
  1531. func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
  1532. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proc__xnet_getsockopt)), 5, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
  1533. if e1 != 0 {
  1534. err = e1
  1535. }
  1536. return
  1537. }
  1538. func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
  1539. _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procgetpeername)), 3, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
  1540. if e1 != 0 {
  1541. err = e1
  1542. }
  1543. return
  1544. }
  1545. func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
  1546. _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procsetsockopt)), 5, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
  1547. if e1 != 0 {
  1548. err = e1
  1549. }
  1550. return
  1551. }
  1552. func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
  1553. var _p0 *byte
  1554. if len(p) > 0 {
  1555. _p0 = &p[0]
  1556. }
  1557. r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procrecvfrom)), 6, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
  1558. n = int(r0)
  1559. if e1 != 0 {
  1560. err = e1
  1561. }
  1562. return
  1563. }