summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common-generic/bits
AgeCommit message (Collapse)Author
2020-09-15Fix memory corruption due to struct stat fieldYann Sionneau
Kernel stat/stat64 structure and uClibc-ng ones were not in sync regarding the timespec fields. Kernel had them but uClibc did not expose it in some cases. Man page says that stat struct should have timespec fields if: * _POSIX_C_SOURCE is defined to 200809L or greater or * _XOPEN_SOURCE is defined to 700 or greater or * _BSD_SOURCE is defined or * _SVID_SOURCE is defined In the case of buildroot vim build, neither _BSD_SOURCE nor _SVID_SOURCE were defined. Only _POSIX_C_SOURCE and _XOPEN_SOURCE were defined. uClibc-ng header only checked for _BSD_SOURCE and _SVID_SOURCE via __USE_MISC. This patch adds a check to __USE_XOPEN2K8 which is defined if _POSIX_C_SOURCE >= 200809L or _XOPEN_SOURCE >= 700 This for instance fixes a crash at startup of vim (not the busybox one) on aarch64 and all other arch where in kernel STAT_HAVE_NSEC is set and where stat.h in uClibc-ng comes from libc/sysdeps/linux/common-generic/bits Signed-off-by: Yann Sionneau <ysionneau@kalray.eu>
2020-07-02Rename __unused struct members to include a namespaceEd Wildgoose
Rename various spare fields in structs to include a namespace This should avoid accidental clashes with uses of the __unused symbol in upstream projects. eg currently it causes a compile error in dhcpcd 8.x due to their re-use of the __unused symbol as a macro This follows the style of glibc which does something equivalent
2018-11-27statfs.h: sync generic header with glibcWaldemar Brodkorb
Fix issues with aarch64 and df with mismatching header between kernel and libc.
2018-02-26stat.h: fix issue with aarch64Waldemar Brodkorb
2017-02-01add experimental aarch64 supportWaldemar Brodkorb
Ported over from GNU C Library and runtime tested in Qemu.
2016-11-27remove UCLIBC_HAS_LFSWaldemar Brodkorb
2013-07-26libc/sysdeps: Fix common-generic stat.h for BE part 2Mischa Jonker
Previous patch only fixed the build. This patch fixes the behavior at run-time as well. It fixes "Value too large for defined data type" messages caused by fstat syscall wrapper returning -EOVERFLOW. Signed-off-by: Mischa Jonker <Mischa.Jonker@synopsys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-03-22libc: Fix common-generic stat.h for BEMischa Jonker
Signed-off-by: Mischa Jonker <mjonker@synopsys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-03-14fstat64: Fix Build warnings with common-generic ABI buildVineet Gupta
CC libc/sysdeps/linux/common/fstat64.os In file included from libc/sysdeps/linux/common/fstat64.c:16: libc/sysdeps/linux/common/xstatconv.h:28: warning: 'struct kernel_stat' declared inside parameter list libc/sysdeps/linux/common/xstatconv.h:28: warning: its scope is only this definition or declaration, which is probably not what you want libc/sysdeps/linux/common/fstat64.c: In function 'fstat64': libc/sysdeps/linux/common/fstat64.c:33: warning: passing argument 2 of '__syscall_fstat64' from incompatible pointer type libc/sysdeps/linux/common/fstat64.c:18: note: expected 'struct stat *' but argument is of type 'struct stat64 *' ------------------------------------------------------------------- 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-20libc/sysdeps: Add new interfaces for new architecturesMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>