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