]> git.ipfire.org Git - thirdparty/glibc.git/commit
Fix MIPS o32 posix_fadvise.
authorJoseph Myers <joseph@codesourcery.com>
Thu, 12 Jan 2017 02:19:00 +0000 (02:19 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Thu, 12 Jan 2017 02:19:00 +0000 (02:19 +0000)
commitc1f0601389db64d97b3a4580c9037d7e1c9daefb
treef0cd4edaf3965527e3fe3085385846a041e30184
parent4dfb9c941132d7b10b897c678f360fd27d6f5c95
Fix MIPS o32 posix_fadvise.

The posix_fadvise consolidation broke posix_fadvise for MIPS o32, so
resulting in posix/tst-posix_fadvise failing.

MIPS o32 (and the other ABIs) has only the posix_fadvise64 syscall,
which acts like posix_fadvise64_64 (in the o32 case, because of the
alignment argument it's actually a 7-argument syscall).  The generic
posix_fadvise implementation presumes that if __NR_fadvise64 is
defined, it's for the case where a single len argument is passed to
the syscall rather than two syscall arguments in the case of a 32-bit
system.

The generic posix_fadvise64 works fine for this case (defining
__NR_fadvise64_64 to __NR_fadvise64 as needed).  ARM has a
posix_fadvise.c that uses __posix_fadvise64_l64 in posix_fadvise, and
that approach also works for MIPS o32, so this patch makes MIPS o32
include the ARM file.

Tested for MIPS o32.

* sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c: New file.
ChangeLog
sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c [new file with mode: 0644]