summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common/stubs.c
AgeCommit message (Collapse)Author
2013-03-14utimes: Export utimensat based utimesVineet Gupta
sys/time.h has libc_hidden_proto(utimes) which generates the hidden "__GI_utimes" symbol reference, and common/utimes.c has a libc_hidden_def(utimes) which generates the exported "utimes" alias. As part of no-legacy-syscall kernel ABI, Commit 80dc2ed05 "utimes: Use utimensat if arch does not have the utimes syscall" introduced a new wrapper, but missed the corresponding libc_hidden_def, causing Busybox (1.20.0) link to fail (for ARC). Also don't generate a STUB, in that case. ---------------->8------------------- .... touch.c:(.text.touch_main+0xdc): undefined reference to `utimes' touch.c:(.text.touch_main+0x114): undefined reference to `utimes' libbb/lib.a(copy_file.o): In function `copy_file': copy_file.c:(.text.copy_file+0x446): undefined reference to `utimes' collect2: ld returned 1 exit status ---------------->8------------------- Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Cc: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20fstatfs: Add __libc_fstatfs wrapperMarkos Chandras
New architectures don't have fstatfs anymore, so we use a wrapper for __libc_fstatfs which will use fstatfs64 internally. The interface however needs to remain the same (i.e accepting a struct statfs as a second argument) for backwards compatibility Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20ustat: Add ustat stub for arches that don't have the ustat system callMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20sendfile: Use sendfile64 if arch does not have the sendfile syscallMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20fork: Use clone if arch does not have the fork syscallMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20inotify_init: Use inotify_init1 if inotify_init syscall is not definedMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20epoll: Use epoll_pwait if arch does not have the epoll_wait syscallMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20epoll: Use epoll_create1 if arch does not have the epoll_create syscallMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20symlink: Use symlinkat if arch does not have the symlink syscallMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-10eventfd: Implement eventfd2 and fix eventfdKhem Raj
eventfd: evntfd assumes to take two arguments instead it should be one evntfd expects two therefore implement both syscalls with correct parameters Thanks Eugene Rudoy for reporting it and also providing the patch Signed-off-by: Khem Raj <raj.khem@gmail.com>
2012-04-26getpgrp: fix fallback handlingMark Salter
The test for generating a stub for getpgrp was wrong and would result in duplicate symbols when building without __NR_getpgrp, but with __NR_getpgid and __NR_getpid. A closer look at the getpgrp implementation using getpgid showed that getpid was being called to pass the current pid to getpgid. This is unnecessary because passing 0 to getpgid returns the pgid of the current process. This patch cleans up the getpgrp implementation and the stub test. Signed-off-by: Mark Salter <msalter@redhat.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-04-04stubs: Disregard LFSBernhard Reutner-Fischer
Fixes handling of e.g. splice Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-03-26arm: disable ioperm/iopl stubsMike Frysinger
ARM always provides its own userspace funcs for ioperm/iopl. They've never had syscalls. So disable the stubs on ARM to avoid multiple definition errors. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-03-26stubs: unified from futureBernhard Reutner-Fischer
Future branch extends stubs with ret_enosys_stub. Resolve conflicts, and use superset of future and current master. Adjust posix_fadvise* accordingly. Upon future merge, pick this master version as the final state. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-01-18stubs: mark stubs as usedBernhard Reutner-Fischer
Avoids warning from -Wunused-function about the alias target that is only used at link-time. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-11-07libc: flesh out linux scheduler functionsHenning Heinold
Most stuff was taken from the eglibc. Signed-off-by: Henning Heinold <heinold@inf.fu-berlin.de> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-11-04Add stub for eventfd.Jean-Christian de Rivaz
Warn if the enventfd() function is not implemented. Signed-off-by: Jean-Christian de Rivaz <jc@eclis.ch> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-11-02stubs: remove leftover undefsBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-11-02stubs: handle linux module functionsBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-11-02stubs: handle linux-specificBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-11-02stubs: fix inverted socket logicBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-11-02stubs: undef linux specific unless they were asked forBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-05-12socket: fix stubsBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-05-11add pipe2()Bernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-05-11socketcalls: add stubsBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-05-11accept4: Implement cancellationBernhard Reutner-Fischer
.. and add proper prototype, move it into it's own obj and other such cleanups. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-03-19lutimes.c, stubs.c: fix compiling lutimes, if __NR_utimensat is not definedPeter S. Mazinger
while there, provide stubs for functions depending on utimensat syscall. Reported-by: Sedat Dilek <sedat.dilek@googlemail.com> Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Khem Raj <raj.khem@gmail.com>
2011-03-03fix stubsPeter S. Mazinger
We use enosys_stub only in this file so make it static Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
2011-02-24unify stub logicMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>