summaryrefslogtreecommitdiff
path: root/include/sys
AgeCommit message (Collapse)Author
2017-05-22include/sys/reboot.h: add constants RB_SW_SUSPEND and RB_KEXECAnthony G. Basile
This syncs up <sys/reboot.h> with the GNU C library, see their commit 1a09dc56. These constants are needed by init systems like openrc. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2017-04-22sys/stat.h: fix missing struct timespec definitionDamien Riegel
This is a second attempt to fix a compilation failure involving a missing struct timespec definition in some situation. Previous attempt was following commit but it had undesirable side effects and was reverted: 657c4a9d6c fcntl.h: fix a missing `struct timespec` definition A similar issue was identified and reported in glibc [1], and the fix was to include the timespec definition if __USE_XOPEN2K8 was defined. To minimize the possible impact of this new fix, it was decided to not replace __USE_ATFILE by __USE_XOPEN2K8 as glibc did, but to add an additional OR condition on __USE_XOPEN2K8. [1] https://sourceware.org/bugzilla/show_bug.cgi?id=21371 Signed-off-by: Damien Riegel <damien.riegel@savoirfairelinux.com>
2017-03-17sync header with GNU libc / kernelWaldemar Brodkorb
The header is not in sync with GNU libc and Linux kernel and therefore produces compile errors with qemu-user (2.8.0). Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
2017-01-14add wrappers for preadv/pwritevWaldemar Brodkorb
2016-12-20sys/cdefs.h: add definition of __attribute_alloc_size__Thomas Petazzoni
Commit cee0b058fa0b4501b289a2da365182d60314d746 ("add aligned_alloc required for latest gcc libstdc++") added the prototype of aligned_alloc() to <stdlib.h>. This prototype contains '__attribute_alloc_size__ ((2))', but this is not defined anywhere in uClibc-ng. This commit addresses that by adding the relevant definition in <sys/cdefs.h>, borrowed from glibc. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-12-10include/sys/mman.h: remove madvise/posix_madvise prototypes on noMMUThomas Petazzoni
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-09-25sync header with glibcWaldemar Brodkorb
Fixes a compile error for samba 4.5.0. Reported-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
2016-06-15sysconf: Support _SC_(AV)?PHYS_PAGES.Nicolas Cavallari
Do it by following the trail of the existing commented code, which implemented it by calling get_phys_pages() and get_avphys_pages(). This patch implements these two functions, which are also glibc extensions. Some program/libraries (e.g. libuv) assumes that sysconf(_SC_PHYS_PAGES) works on linux and never check for -1, thus they report an insane amount of memory. Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
2016-01-31Provide __adjtimex() alias, like glibc.Leonid Lisovskiy
Althought recent versions of sofware don't require it, old ntpd wants - see http://bugs.ntp.org/show_bug.cgi?id=769 Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com> Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2015-12-09Define __attribute_const__Waldemar Brodkorb
Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com> Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2015-03-17include: silence __leaf warningBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-03-13unistd.h: put getppid under XOPEN2K8Bernhard Reutner-Fischer
Add __LEAF to all __THROW, introduce non-leaf __THROWNL Adjust affected spots accordingly. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-08-26timex: Sync with glibcKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-08-25Add clock_adjtime syscallKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-04-04sysinfo.h: Prevent redeclarationsBernhard Reutner-Fischer
Guard against duplicate inclusion. We should go back to just including the linux/sysinfo.h .. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20stat: Use fstatat64 if arch does not have the stat syscallMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20stat64: Use fstatat64 if arch does not have the stat64 syscallMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20statfs: Use statfs64 if arch does not have the statfs syscallMarkos 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-20mkdir: Use mkdirat if arch does not have the mkdir syscallMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-02-20chmod: Use fchmodat if arch does not have the chmod syscallMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-01-18mount.h: updateBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-11-18drop support for pre ISO-C compilersMike Frysinger
This drops __signed, __volatile, and __const. Only the latter was used in the code base, and for uClibc, not consistently. Much of the code used plain "const" which meant "__const" was useless. Really, the point of this is to stay in sync with what glibc did. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-11-18Replace FSF snail mail address with URLsMike Frysinger
This matches a similar change made to glibc. No functional changes here. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-06-15socketcalls.c: rewrite to use cancel.hPeter S. Mazinger
__socketcall.c: remove guard, we definitely need this syscall Re-added guard plus added comment (Bernhard) Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15waitpid.c: provide __waitpid_nocancel, use cancel.hPeter S. Mazinger
Use __wait4_nocancel since wait4 is not available all the time. Add a comment about not using waitpid syscall. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15select: adapt cancelation to use cancel.hPeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15wait4.c: provide hidden __wait4_nocancel independent of any guardsPeter S. Mazinger
Correct wait4 guard (it is only __USE_BSD) wait3, system: use __wait4_nocancel Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15umount: make umount2 depend on UCLIBC_LINUX_SPECIFICPeter S. Mazinger
Add hidden umount2 to be used in umount eventually. Rework umount to either use directly umount2 syscall or function. docs say, that mount and umount are also Linux specific Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15ppoll: no need for hidden versionPeter S. Mazinger
Guard as GNU extension. Reorganize a bit. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15types.h: both icc and tendra support long longPeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15ssp: rework, sync messages with the ones in glibcPeter S. Mazinger
Touch signals only if DODEBUG is enabled. Make the signal selection dependent on DODEBUG, as last resort use SIGKILL. Use internal functions with less arguments, some savings. Fix a warning about unused argument. Do not use openlog/closelog, while there remove their hidden versions. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15syslog.c: no need for hidden vsyslog, use a static __vsyslog insteadPeter S. Mazinger
It is only used within the same file. Guard the visible version according to header. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15wait.h: resource.h is included already, rusage is definedPeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15quota.h: update, but keep old functionalityPeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-04-08signalfd.h: Use new "bits/" scheme for arch-specific flagsKevin Cernekee
glibc has split off the arch-specific flag definitions (like SFD_NONBLOCK) into <arch>/bits/signalfd.h, so that there are no longer multiple redundant copies of the entire header file. We will adopt the same scheme in uClibc. Special cases are included for: alpha mips sparc hppa was omitted because it has not been updated in glibc. All others use the common definition. Signed-off-by: Kevin Cernekee <cernekee@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-12-22sys/queue.h: update to eglibc versionNatanael Copa
Xen needs SIMPLEQ_* queue types which was not provided from the old uclibc queue.h. Use same implementation as eglibc. Grabbed from: http://www.eglibc.org/svn/trunk/libc/misc/sys/queue.h Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-07-01mips/signalfd.h: SFD_NONBLOCK for mips is 0200 unlike 04000 commonlyKhem Raj
Exposed by udev 171 which uses signalfd Signed-off-by: Khem Raj <raj.khem@gmail.com>
2011-05-12linux_specific: handle accept4 and pipe2Bernhard 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-03update some headersPeter S. Mazinger
Sync some headers with glibc. realpath is an XSI extension in SuSv4, add back guard and update comment, since it seems to allow != NULL in second arg. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
2010-09-20nptl: Fix libpthread build when UCLIBC_LINUX_SPECIFIC is disabledCarmelo Amoroso
NPTL library needs both madvise and statfs symbols, that are guarded by UCLIBC_LINUX_SPECIFIC option. This fix provides these symbols too when NPTL is used, indipendently by UCLIBC_LINUX_SPECIFIC choice. Otherwise libpthread link fails as below: LD libpthread-0.9.32-git.so libpthread/nptl/libpthread_so.a(pthread_create.oS): In function `__free_tcb': pthread_create.c:(.text+0x1184): undefined reference to `madvise' libpthread/nptl/libpthread_so.a(sem_open.oS): In function `__where_is_shmfs': sem_open.c:(.text+0x764): undefined reference to `statfs' collect2: ld returned 1 exit status make: *** [lib/libpthread.so] Error 1 Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2010-08-05sysconf: implement _SC_NPROCESSORS_CONF, _SC_NPROCESSORS_ONLNBernhard Reutner-Fischer
perusing the config parser Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-07-27lutimes: add lutimes supportVladimir Zapolskiy
This patch adds lutimes library call support. Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-07-09include/param.h: Dont use ARG_MAX from kernel headersKhem Raj
* Use getrlimit for ARG_MAX in sysconf on nptl. * Define NCARGS directly instead of ARG_MAX Signed-off-by: Khem Raj <raj.khem@gmail.com>
2009-11-20futimens: add functionBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-11-19sync some headers and disable unused prototypesPeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-11-19msgrcv is of type ssize_tPeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-11-19no need for bits/syscalls.h on targetPeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-09-15sys/mount.h: sync with latest glibcMike Frysinger
Newer glibc adds a few more MNT_* flags, so import them. Signed-off-by: Mike Frysinger <vapier@gentoo.org>