1 /* go-nosys.c -- functions missing from system.
3 Copyright 2012 The Go Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style
5 license that can be found in the LICENSE file. */
7 /* This file exists to provide definitions for functions that are
8 missing from libc, according to the configure script. This permits
9 the Go syscall package to not worry about whether the functions
17 #include <sys/types.h>
23 typedef signed int off64_t
__attribute__ ((mode (DI
)));
27 typedef off64_t loff_t
;
30 #ifndef HAVE_EPOLL_CREATE1
32 epoll_create1 (int flags
__attribute__ ((unused
)))
39 #ifndef HAVE_FACCESSAT
41 faccessat (int fd
__attribute__ ((unused
)),
42 const char *pathname
__attribute__ ((unused
)),
43 int mode
__attribute__ ((unused
)),
44 int flags
__attribute__ ((unused
)))
51 #ifndef HAVE_FALLOCATE
53 fallocate (int fd
__attribute__ ((unused
)),
54 int mode
__attribute__ ((unused
)),
55 off_t offset
__attribute__ ((unused
)),
56 off_t len
__attribute__ ((unused
)))
65 fchmodat (int dirfd
__attribute__ ((unused
)),
66 const char *pathname
__attribute__ ((unused
)),
67 mode_t mode
__attribute__ ((unused
)),
68 int flags
__attribute__ ((unused
)))
77 fchownat (int dirfd
__attribute__ ((unused
)),
78 const char *pathname
__attribute__ ((unused
)),
79 uid_t owner
__attribute__ ((unused
)),
80 gid_t group
__attribute__ ((unused
)),
81 int flags
__attribute__ ((unused
)))
88 #ifndef HAVE_FUTIMESAT
90 futimesat (int dirfd
__attribute__ ((unused
)),
91 const char *pathname
__attribute__ ((unused
)),
92 const struct timeval times
[2] __attribute__ ((unused
)))
99 #ifndef HAVE_INOTIFY_ADD_WATCH
101 inotify_add_watch (int fd
__attribute__ ((unused
)),
102 const char* pathname
__attribute__ ((unused
)),
103 uint32_t mask
__attribute__ ((unused
)))
110 #ifndef HAVE_INOTIFY_INIT
119 #ifndef HAVE_INOTIFY_INIT1
121 inotify_init1 (int flags
__attribute__ ((unused
)))
128 #ifndef HAVE_INOTIFY_RM_WATCH
130 inotify_rm_watch (int fd
__attribute__ ((unused
)),
131 uint32_t wd
__attribute__ ((unused
)))
140 mkdirat (int dirfd
__attribute__ ((unused
)),
141 const char *pathname
__attribute__ ((unused
)),
142 mode_t mode
__attribute__ ((unused
)))
151 mknodat (int dirfd
__attribute__ ((unused
)),
152 const char *pathname
__attribute__ ((unused
)),
153 mode_t mode
__attribute__ ((unused
)),
154 dev_t dev
__attribute__ ((unused
)))
163 openat (int dirfd
__attribute__ ((unused
)),
164 const char *pathname
__attribute__ ((unused
)),
165 int oflag
__attribute__ ((unused
)),
173 #ifndef HAVE_RENAMEAT
175 renameat (int olddirfd
__attribute__ ((unused
)),
176 const char *oldpath
__attribute__ ((unused
)),
177 int newdirfd
__attribute__ ((unused
)),
178 const char *newpath
__attribute__ ((unused
)))
187 splice (int fd
__attribute__ ((unused
)),
188 loff_t
*off_in
__attribute__ ((unused
)),
189 int fd_out
__attribute__ ((unused
)),
190 loff_t
*off_out
__attribute__ ((unused
)),
191 size_t len
__attribute__ ((unused
)),
192 unsigned int flags
__attribute__ ((unused
)))
199 #ifndef HAVE_SYNC_FILE_RANGE
201 sync_file_range (int fd
__attribute__ ((unused
)),
202 off64_t offset
__attribute__ ((unused
)),
203 off64_t nbytes
__attribute__ ((unused
)),
204 unsigned int flags
__attribute__ ((unused
)))
213 tee (int fd_in
__attribute__ ((unused
)),
214 int fd_out
__attribute__ ((unused
)),
215 size_t len
__attribute__ ((unused
)),
216 unsigned int flags
__attribute__ ((unused
)))
223 #ifndef HAVE_UNLINKAT
225 unlinkat (int dirfd
__attribute__ ((unused
)),
226 const char *pathname
__attribute__ ((unused
)),
227 int flags
__attribute__ ((unused
)))
236 unshare (int flags
__attribute__ ((unused
)))