Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZTS: small fix for SEEK_DATA/SEEK_HOLE tests #16413

Merged
merged 1 commit into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions tests/zfs-tests/cmd/mmap_seek.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@
#include <linux/fs.h>
#endif

/* some older uClibc's lack the defines, so we'll manually define them */
#ifdef __UCLIBC__
#ifndef SEEK_DATA
#define SEEK_DATA 3
#endif
#ifndef SEEK_HOLE
#define SEEK_HOLE 4
#endif
#endif

static void
seek_data(int fd, off_t offset, off_t expected)
{
Expand Down
7 changes: 7 additions & 0 deletions tests/zfs-tests/tests/functional/cp_files/seekflood.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@
#include <sys/stat.h>
#include <sys/wait.h>

/* some older uClibc's lack the defines, so we'll manually define them */
#ifdef __UCLIBC__
#ifndef SEEK_DATA
#define SEEK_DATA 3
#endif
#endif

#define DATASIZE (4096)
char data[DATASIZE];

Expand Down
Loading