> From: Michael Hope > Date: Mon, 11 Jun 2012 18:16:51 +1200 > > On 11 June 2012 17:59, Mark Kettenis wrote: > >> Date: Mon, 11 Jun 2012 16:25:22 +1200 > >> From: Michael Hope > >> > >> The Linux Standard Base APIs include posix_madvise() but don't define > >> values for the 'advice' argument.  Check to see if POSIX_MADV_WILLNEED > >> is defined before using. > > > > What real-world problem does this fix? > > Being able to build GDB using the LSB tools so that you can make a > binary release that works on any Linux distro from RHEL4 and above. > We use it for the linaro-toolchain-binaries. I fear you're using a broken toolchain, because... > > It makes no sense to have > > posix_madvise() but not define any values for the 'advice' argument. > > I'd say this is a "bug" in LSB.  Either they should drop > > posix_madvise() from the standard, or include at least the 'advice' > > values required by POSIX. > > The LSB has a policy of not dropping functions. I can suggest that > they add the advise values for a later version but that will take some > time and won't cover existing LSB releases. Both posix_madvise(): http://www.linuxbase.org/navigator/browse/int_single.php?cmd=list-by-name&Iname=posix_madvise&Ilibrary=libc and POSIX_MADV_WILLNEED: http://www.linuxbase.org/navigator/browse/headgroup.php?cmd=list-byheadgroup&HGid=56 were added in LSB 3.2.