HomeFreeBSD

ZTS: small fix for SEEK_DATA/SEEK_HOLE tests (#16413)

Description

ZTS: small fix for SEEK_DATA/SEEK_HOLE tests (#16413)

Some libc's like uClibc lag the proper definition of SEEK_DATA
and SEEK_HOLE. Since we have only two files in ZTS which use
these definitons, let's define them by hand:

#ifndef SEEK_DATA
#define SEEK_DATA 3
#endif
#ifndef SEEK_HOLE
#define SEEK_HOLE 4
#endif

There should be no failures, because:

  • FreeBSD has support for SEEK_DATA/SEEK_HOLE since FreeBSD 8
  • Linux has it since Linux 3.1
  • the libc will submit the parameters unchanged to the kernel

Signed-off-by: Tino Reichardt <milky-zfs@mcmilk.de>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>

Details

Provenance
Tino Reichardt <milky-zfs@mcmilk.de>Authored on Aug 7 2024, 4:52 PM
GitHub <noreply@github.com>Committed on Aug 7 2024, 4:52 PM
Parents
rGcbcb522439ac: Fix the names of some FreeBSD sysctls in include/tunables.cfg (#16395)
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rGbd949b10bed3: ZTS: small fix for SEEK_DATA/SEEK_HOLE tests (#16413) (authored by Tino Reichardt <milky-zfs@mcmilk.de>).Aug 7 2024, 4:52 PM