2 * system call not available stub
4 * Copyright (C) 2009 Analog Devices Inc.
6 * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
9 /* Please keep the list sorted alphabetically, in ascending order
10 * of the stub name! */
13 #include <bits/wordsize.h>
14 #include <sys/syscall.h>
16 #ifdef __UCLIBC_HAS_STUBS__
18 __attribute_used__
static int enosys_stub(void)
24 __attribute_used__
static int ret_enosys_stub(void)
29 #define make_stub(stub) \
30 link_warning(stub, #stub ": this function is not implemented") \
31 strong_alias(enosys_stub, stub)
33 #define make_ret_stub(stub) \
34 link_warning(stub, #stub ": this function is not implemented") \
35 strong_alias(ret_enosys_stub, stub)
38 # define __NR_fadvise64_64 __NR_arm_fadvise64_64
39 # define __NR_fadvise64 __NR_arm_fadvise64_64
40 /* ARM always provides funcs w/out syscalls; disable the stubs */
41 # define __NR_ioperm 0
46 # define __NR_fadvise64_64 __NR_fadvise64
50 # define __NR_fadvise64 __NR_fadvise64_64
53 #if !defined __NR_accept && !defined __NR_socketcall && defined __UCLIBC_HAS_SOCKET__
57 #if !defined __NR_accept4 && !defined __NR_socketcall && defined __UCLIBC_HAS_SOCKET__ && defined __UCLIBC_LINUX_SPECIFIC__
61 #if !defined __NR_arch_prctl && defined __UCLIBC_LINUX_SPECIFIC__
65 #if !defined __NR_bdflush && defined __UCLIBC_LINUX_SPECIFIC__
69 #if !defined __NR_bind && !defined __NR_socketcall && defined __UCLIBC_HAS_SOCKET__
73 #if !defined __NR_capget && defined __UCLIBC_LINUX_SPECIFIC__
77 #if !defined __NR_capset && defined __UCLIBC_LINUX_SPECIFIC__
81 #if !defined __NR_connect && !defined __NR_socketcall && defined __UCLIBC_HAS_SOCKET__
85 #if !defined __NR_epoll_create && defined __UCLIBC_HAS_EPOLL__ \
86 && !defined __NR_epoll_create1
87 make_stub(epoll_create
)
90 #if !defined __NR_epoll_ctl && defined __UCLIBC_HAS_EPOLL__
94 #if !defined __NR_epoll_pwait && defined __UCLIBC_HAS_EPOLL__
95 make_stub(epoll_pwait
)
98 #if !defined __NR_epoll_wait && defined __UCLIBC_HAS_EPOLL__ \
99 && !defined __NR_epoll_pwait
100 make_stub(epoll_wait
)
103 #if !defined __NR_eventfd && !defined __NR_eventfd2 && defined __UCLIBC_LINUX_SPECIFIC__
107 #if !defined __NR_fdatasync && !defined __NR_osf_fdatasync
111 #ifndef __NR_fgetxattr
115 #ifndef __NR_flistxattr
116 make_stub(flistxattr
)
119 #if !defined __ARCH_USE_MMU__ || (!defined __NR_fork && !defined __NR_clone)
123 #ifndef __NR_fremovexattr
124 make_stub(fremovexattr
)
127 #ifndef __NR_fsetxattr
131 #if !defined __NR_fstatfs && !defined __NR_fstatfs64 \
132 && defined __UCLIBC_LINUX_SPECIFIC__
136 #ifndef __NR_get_kernel_syms
137 make_stub(get_kernel_syms
)
140 #if !defined __NR_getpeername && !defined __NR_socketcall && defined __UCLIBC_HAS_SOCKET__
141 make_stub(getpeername
)
144 #if !defined __NR_getpgrp && !defined __NR_getpgid
148 #if !defined __NR_getrandom && defined __UCLIBC_LINUX_SPECIFIC__
152 #if !defined __NR_getsockname && !defined __NR_socketcall && defined __UCLIBC_HAS_SOCKET__
153 make_stub(getsockname
)
156 #if !defined __NR_getsockopt && !defined __NR_socketcall && defined __UCLIBC_HAS_SOCKET__
157 make_stub(getsockopt
)
160 #ifndef __NR_getxattr
164 #if !defined __NR_inotify_add_watch && defined __UCLIBC_LINUX_SPECIFIC__
165 make_stub(inotify_add_watch
)
168 #if !defined __NR_inotify_init && defined __UCLIBC_LINUX_SPECIFIC__ \
169 && !defined __NR_inotify_init1
170 make_stub(inotify_init
)
173 #if !defined __NR_inotify_init1 && defined __UCLIBC_LINUX_SPECIFIC__
174 make_stub(inotify_init1
)
177 #if !defined __NR_inotify_rm_watch && defined __UCLIBC_LINUX_SPECIFIC__
178 make_stub(inotify_rm_watch
)
181 #if !defined __NR_ioperm && defined __UCLIBC_LINUX_SPECIFIC__
185 #if !defined __NR_iopl && defined __UCLIBC_LINUX_SPECIFIC__
189 #ifndef __NR_lgetxattr
193 #if !defined __NR_listen && !defined __NR_socketcall && defined __UCLIBC_HAS_SOCKET__
197 #ifndef __NR_listxattr
201 #ifndef __NR_llistxattr
202 make_stub(llistxattr
)
205 #ifndef __NR_lremovexattr
206 make_stub(lremovexattr
)
209 #ifndef __NR_lsetxattr
213 #if !defined __NR_madvise && defined __UCLIBC_LINUX_SPECIFIC__
217 #if !defined __NR_modify_ldt && defined __UCLIBC_LINUX_SPECIFIC__
218 make_stub(modify_ldt
)
226 #if !defined __NR_personality && defined __UCLIBC_LINUX_SPECIFIC__
227 make_stub(personality
)
230 #if !defined __NR_pipe2 && defined __UCLIBC_LINUX_SPECIFIC__
234 #if !defined __NR_pivot_root && defined __UCLIBC_LINUX_SPECIFIC__
235 make_stub(pivot_root
)
238 #if !defined __NR_fadvise64
239 make_ret_stub(posix_fadvise
)
242 #if !defined __NR_fadvise64_64 && __WORDSIZE == 32
243 make_ret_stub(posix_fadvise64
)
247 make_ret_stub(posix_madvise
)
250 #if !defined __NR_ppoll && defined __UCLIBC_LINUX_SPECIFIC__
254 #if !defined __NR_prctl && defined __UCLIBC_LINUX_SPECIFIC__
258 #if !defined __NR_readahead && defined __UCLIBC_LINUX_SPECIFIC__
262 #if !defined __NR_reboot && defined __UCLIBC_LINUX_SPECIFIC__
266 #if !defined __NR_recv && !defined __NR_socketcall && !defined __NR_recvfrom && defined __UCLIBC_HAS_SOCKET__
270 #if !defined __NR_recvfrom && !defined __NR_socketcall && defined __UCLIBC_HAS_SOCKET__
274 #if !defined __NR_recvmsg && !defined __NR_socketcall && defined __UCLIBC_HAS_SOCKET__
278 #if !defined __NR_remap_file_pages && defined __UCLIBC_LINUX_SPECIFIC__
279 make_stub(remap_file_pages
)
282 #ifndef __NR_removexattr
283 make_stub(removexattr
)
286 #ifndef __NR_renameat
290 #if !defined __NR_sched_getaffinity && defined __UCLIBC_LINUX_SPECIFIC__
291 make_stub(sched_getaffinity
)
294 #if !defined __NR_getcpu && defined __UCLIBC_LINUX_SPECIFIC__ && ((defined __x86_64__ && !defined __UCLIBC_HAS_TLS__) || !defined __x86_64__)
295 make_stub(sched_getcpu
)
298 #if !defined __NR_sched_setaffinity && defined __UCLIBC_LINUX_SPECIFIC__
299 make_stub(sched_setaffinity
)
302 #if !defined __NR_send && !defined __NR_socketcall && !defined __NR_sendto && defined __UCLIBC_HAS_SOCKET__
306 #if !defined __NR_sendfile && !defined __NR_sendfile64 \
307 && defined __UCLIBC_LINUX_SPECIFIC__
311 #if !defined __NR_sendfile64 && !defined __NR_sendfile && defined __UCLIBC_LINUX_SPECIFIC__
312 make_stub(sendfile64
)
315 #if !defined __NR_sendmsg && !defined __NR_socketcall && defined __UCLIBC_HAS_SOCKET__
319 #if !defined __NR_sendto && !defined __NR_socketcall && defined __UCLIBC_HAS_SOCKET__
323 #if ((__WORDSIZE == 32 && (!defined __NR_setfsgid32 && !defined __NR_setfsgid)) || (__WORDSIZE == 64 && !defined __NR_setfsgid)) && defined __UCLIBC_LINUX_SPECIFIC__
327 #if ((__WORDSIZE == 32 && (!defined __NR_setfsuid32 && !defined __NR_setfsuid)) || (__WORDSIZE == 64 && !defined __NR_setfsuid)) && defined __UCLIBC_LINUX_SPECIFIC__
331 #if !defined __NR_setns && defined __UCLIBC_LINUX_SPECIFIC__
335 #if !defined __NR_setresgid32 && !defined __NR_setresgid && defined __UCLIBC_LINUX_SPECIFIC__
339 #if !defined __NR_setresuid32 && !defined __NR_setresuid && defined __UCLIBC_LINUX_SPECIFIC__
343 #if !defined __NR_setsockopt && !defined __NR_socketcall && defined __UCLIBC_HAS_SOCKET__
344 make_stub(setsockopt
)
347 #ifndef __NR_setxattr
351 #if !defined __NR_shutdown && !defined __NR_socketcall && defined __UCLIBC_HAS_SOCKET__
355 #if !defined __NR_signalfd4 && !defined __NR_signalfd && defined __UCLIBC_LINUX_SPECIFIC__
359 #ifndef __NR_rt_sigtimedwait
360 make_stub(sigtimedwait
)
361 make_stub(sigwaitinfo
)
364 #ifndef __NR_rt_sigqueueinfo
368 #if !defined __NR_socket && !defined __NR_socketcall && defined __UCLIBC_HAS_SOCKET__
372 #if !defined __NR_socketcall && defined __UCLIBC_HAS_SOCKET__
373 make_stub(socketcall
)
376 #if !defined __NR_socketpair && !defined __NR_socketcall && defined __UCLIBC_HAS_SOCKET__
377 make_stub(socketpair
)
380 #if !defined __NR_stime && !defined __NR_settimeofday
382 make_stub(settimeofday
)
385 #if !defined __NR_splice && defined __UCLIBC_LINUX_SPECIFIC__
389 #if !defined __NR_swapoff && defined __UCLIBC_LINUX_SPECIFIC__
393 #if !defined __NR_swapon && defined __UCLIBC_LINUX_SPECIFIC__
397 #if !defined __NR_symlink && !defined __NR_symlinkat
401 #if !defined __NR_sync_file_range && defined __UCLIBC_LINUX_SPECIFIC__
402 make_stub(sync_file_range
)
405 #if !defined __NR__sysctl && defined __UCLIBC_LINUX_SPECIFIC__
409 #if !defined __NR_sysinfo && defined __UCLIBC_LINUX_SPECIFIC__
413 #if !defined __NR_tee && defined __UCLIBC_LINUX_SPECIFIC__
417 #if !defined __NR_timerfd_create && defined __UCLIBC_LINUX_SPECIFIC__
418 make_stub(timerfd_create
)
421 #if !defined __NR_timerfd_settime && defined __UCLIBC_LINUX_SPECIFIC__
422 make_stub(timerfd_settime
)
425 #if !defined __NR_timerfd_gettime && defined __UCLIBC_LINUX_SPECIFIC__
426 make_stub(timerfd_gettime
)
429 #ifndef __NR_utimensat
432 # ifndef __NR_lutimes
437 #ifndef __NR_utimensat
438 #if !defined __NR_utime && !defined __NR_utimes
439 /*make_stub(utime) obsoleted */
444 #if !defined __NR_umount && !defined __NR_umount2 && defined __UCLIBC_LINUX_SPECIFIC__
448 #if !defined __NR_umount2 && defined __UCLIBC_LINUX_SPECIFIC__
452 #if !defined __NR_unshare && defined __UCLIBC_LINUX_SPECIFIC__
456 #if defined __UCLIBC_SV4_DEPRECATED__ && !defined __NR_ustat
460 #if !defined __NR_vhangup && defined __UCLIBC_LINUX_SPECIFIC__
464 #if !defined __NR_vmsplice && defined __UCLIBC_LINUX_SPECIFIC__